Convert date to quarter + year
Posted on 2007-10-18
Need to convert a date to quarters. for instance, i retrieve a date field from a database using SQL and it is currently in this format: "10/25/2007 8:00:00 AM". I need to have the value of this field converted into a specific quarter name based on the month. So, since the date is october, I need it to say "Fall - 2007".
So here is the logic: If the date month is January, February or March (display "Winter - Year")
If the date month is April, May or June (display "Spring - Year")
If the date month is July, August, September (display "Summer - Year")
and of course October, November, December (display "Fall - Year")
Help is greatly appreciated!!!!