Quarter/Year

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...
 
D

Douglas J. Steele

Format(MyDateField, "\Qq\-yy")

To get just the number, you can use DatePart("q", MyDateField)
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top