Convert dd-mm-YYYY to Quarter

K

kza40381

Can someone help me convert my date field i.e. "6/26/2003" to quarters of the
year using vb code? Thank you!
 
J

John Spencer (MVP)

Format([YourDateField],"yyyy-q")

or
DatePart("q",[YourDateField]) as TheQuarter
and
Year([YourDateField} as TheYear

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
N

ND Pard

Consider using the DatePart Function:

DatePart("q",[name of Date field])

Good Luck.
 
Top