Quarter of Year

H

Hanksor

Is it possible to find what quarter of the year a given date is in? Any
help will be appreciated.
 
T

Tom Lake

Hanksor said:
Is it possible to find what quarter of the year a given date is in? Any
help will be appreciated.

Add this to a Module (any module) and then use the Qtr function

Function Qtr(d As Date)
Select Case Month(d)
Case 1 To 3
Qtr = 1
Case 4 To 6
Qtr = 2
Case 7 To 9
Qtr = 3
Case 10 To 12
Qtr = 4
End Select
End Function

Tom Lake
 
R

RoyVidar

Hanksor wrote in message said:
Is it possible to find what quarter of the year a given date is in? Any
help will be appreciated.

Try for instance with the format function

select format(mydate, "q") as myquarter ...
 

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

Similar Threads


Top