Datepart function problem

  • Thread starter Thread starter jasonjansari
  • Start date Start date
J

jasonjansari

Guest
Hi,

I seem to be stuck when trying to get "mm-yy" from a "dd/mm/yyyy" field.

For example I want the query to bring back "Jan 05" or "January 2005" from "01/01/2005"

I've tried using the datepart function i.e. datepart("mm-yyyy",[date but to no avail.... can anyone help???

Many Thanks in advance

Jason
 
Try using the Format function as follows

format([YourFieldName],"mmm yyyy") = Jan 2005
or
format([YourFieldName],"mmmm yyyy") = January 2005
 

Users who are viewing this thread

Back
Top Bottom