February 12, 2008 at 3:34 pm
Hi I have got a dates table containing every possible date ftill 2017.
It has got a counter field and date field. Now I need to add an extra column called 'Quarter' which shows the year and quarter for the dates.
here is the result table i want
Counter Date Quarter
1 1/1/2005 Q1/2005
2 23/11/2006 Q4/2006
3 12/4/2000 Q2/2000
Please help guys
Thnks
February 12, 2008 at 3:52 pm
UPDATE Table1
SET Quarter = 'Q' + DATENAME(QUARTER, Date) + '/' + DATENAME(YEAR, Date)
N 56°04'39.16"
E 12°55'05.25"
February 12, 2008 at 3:59 pm
If you load your date table with the function on this link, it has columns for quarters and many other date attributes built in.
Date Table Function F_TABLE_DATE:
February 12, 2008 at 4:05 pm
Since the data is already in the table, it seems a bit much to store it another time but in a different format. How about using a view or a computed column?
February 12, 2008 at 4:07 pm
Thank you so much!!v :hehe:
That exactly what I wanted
God bless
Cheers
😀
February 12, 2008 at 8:38 pm
Nuts (2/12/2008)
That exactly what I wanted
Just curious... which way did you end up going exactly?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply