Quote:
quote:Originally posted by pgtips
Can't you just do
Code:
SELECT DatePart("q",[AGE_DATE]) & "," & Year([AGE_DATE]) AS QtrYr
FROM TableName;
|
Yes, but a word of caution when calculating quarters. Ask your financial dept. what your fiscal year is. The DATEPART function will give you quarters assuming Q1 = January to March, Q2 = April to June, Q3 = July to September, and Q4 = October to December. In my office, that would be incorrect. Our fiscal year is Q1 = October to December. In other offices, Q1 = July to September.
Whatever your quarter is, you need to offset the number the DATEPART gives you and make a note of it in your code.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division