Is it possible to find what quarter of the year a given date is in? Any help will be appreciated.
H Hanksor Jan 19, 2006 #1 Is it possible to find what quarter of the year a given date is in? Any help will be appreciated.
T Tom Lake Jan 19, 2006 #2 Hanksor said: Is it possible to find what quarter of the year a given date is in? Any help will be appreciated. Click to expand... 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
Hanksor said: Is it possible to find what quarter of the year a given date is in? Any help will be appreciated. Click to expand... 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 Jan 19, 2006 #3 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. Click to expand... Try for instance with the format function select format(mydate, "q") as myquarter ...
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. Click to expand... Try for instance with the format function select format(mydate, "q") as myquarter ...
H Hanksor Jan 19, 2006 #4 Thanks!!! That's what I needed...... RoyVidar said: Try for instance with the format function select format(mydate, "q") as myquarter ... Click to expand...
Thanks!!! That's what I needed...... RoyVidar said: Try for instance with the format function select format(mydate, "q") as myquarter ... Click to expand...