Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get month from dd/mm/yyyy

Status
Not open for further replies.

daveh

Technical User
Jun 22, 2000
57
GB
Hi,

I have a field which stores the date in date/time format dd/mm/yyyy, and I want to build an expression within a query that extracts the month in full text form (e.g. xx/06/xxxx = "June").

I'm pretty sure this must be easy but I can't quite work it out as I haven't got much experience with Access queries.

Thank you for your help in advance.

David.
 
Thank you, this is great!

Dave.
 
First of all, you aren't actually storing the date in a format. Dates are stored as 8 byte floating point numbers. You have only chose a format to represent the date when viewing the table directly.

You don't need to use the Format() function in a query either as, if you right click on the field in the Query Grid, you can simply set the Format property of the field to mmmm.

Stewart J. McAbney | Talk History
 
You could also use this:
MonthText = MonthName(Month(DATE_FIELD))

Make the code do all the fancy work...

Hope that helps,
Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top