SQL Server date conversion
So just a yearly quarter, not financial etc...what about eomonth(convert(date, REPLACE(REPLACE(REPLACE(REPLACE(<field>, 'Q1', '03'),'Q2','06'),'Q3','09'),'Q4','12') + '-01'))Not sure if EOMonth...
View ArticleSQL Server date conversion
Hi Thanks for the approachThere is one issue in RIGHT function when I am using a variabledeclare @var1 char(50) set @var1 = '2012-Q2' select Right(@cat1, 1)Above is returning null while if I use select...
View ArticleSQL Server date conversion
Hi Thanks for the approachThere is one issue in RIGHT function when I am using a variabledeclare @var1 char(50) set @var1 = '2012-Q2' select Right(@cat1, 1)Above is returning null while if I use select...
View ArticleSQL Server date conversion
DECLARE @YourTable TABLE ( StrDate varchar(20) ) INSERT INTO @YourTable VALUES ('2014-Q1') INSERT INTO @YourTable VALUES ('2014-Q2') INSERT INTO @YourTable VALUES ('2014-Q3') INSERT INTO @YourTable...
View ArticleSQL Server date conversion
No I don't have a table like this which can identify the Q3 but I think i can use case statement and convert for each quarter [ like harcoding ] as i just require to convert to the last day of...
View ArticleSQL Server date conversion
Have you got a date table that helps identify what makes quarter 3 etc?
View ArticleSQL Server date conversion
Hi,I am facing an issue1:- From Source system ,I am getting dates like --- 2014-Q32014-Q22014-09As per my requirement, I need to convert this time to dates like 1:- 2014-Q3 --- last day of quarter...
View Article
More Pages to Explore .....