Quarter/Year

  • Thread starter Thread starter Tracy
  • Start date Start date
T

Tracy

Is there a built in function in Access that can convert a
date to a particular quarter/year (e.g., Q1-03, Q2-03, or
even just 1 for quarter 1, 2 for quarter 2). I don't want
to create a custom function unless I really have to...
 
Format(MyDateField, "\Qq\-yy")

To get just the number, you can use DatePart("q", MyDateField)
 
Is there a built in function in Access that can convert a
date to a particular quarter/year (e.g., Q1-03, Q2-03, or
even just 1 for quarter 1, 2 for quarter 2). I don't want
to create a custom function unless I really have to...

Yes: DatePart("q", [datefield]) will get you 1, 2 or 3;
Format([datefield], "\Qq-yy") will get the Q1-03 appearance.
 
Back
Top