MS Access - Format Date As Fiscal Quarter

Tips and tricks using VBA and office automation ...
User avatar
magicrat
Site Admin
Posts: 15
Joined: Sun Dec 14, 2014 12:33 pm
Location: Manassas, VA
Contact:

MS Access - Format Date As Fiscal Quarter

Postby magicrat » Tue Dec 16, 2014 8:26 am

Here's the elusive format formula to take a date and determine year and quarter.

Code: Select all

FiscalQuarterAndYear: Format$(DateAdd("q",1,[MyDateField]),"q" & " - " & "yyyy",0,0)
Example Output:

Code: Select all

MyDateField FiscalQuarterAndYear 14-Mar-14 2 - 2014 14-Sep-14 4 - 2014 14-Oct-14 1 - 2015 14-Dec-14 1 - 2015
-- Rat

Image

Return to “Microsoft Access & VBA”

Who is online

Users browsing this forum: No registered users and 0 guests

cron

© 2008 MAGIC RAT PRODUCTIONS
SEE ME ON FACEBOOK
Facebook