Format Date field as Quarter

jvbeats

Registered User.
Local time
Yesterday, 23:27
Joined
Jan 23, 2013
Messages
10
Hi, I am relatively new to Access, I would like to format a date field as a quarter in my query. Not sure how to build the expression.

Thank you.
 
Hey there, try ...
Code:
Month(YourDate)\4 + 1
Cheers,
 
You could also use

datepart("q",YourDate) returns an integer (I think).
 
Sorry. I think what works best is Format([mydate],"q")
 
Sorry. I think what works best is Format([mydate],"q")

A subtle point that should always be kept in mind.

DatePart() returns a Number while Format() returns a String.

It doesn't matter with Quarter but it makes a difference if you are sorting the output on Month or Day.
 

Users who are viewing this thread

Back
Top Bottom