Parsing a date in a query

stanger1

Registered User.
Local time
Today, 14:28
Joined
Jul 30, 2002
Messages
53
I have a query that pulls a date field from a table. The field is in the dd/mm/yyyy format. Is there an easy way of pulling the month out of the field and then pull the year when I run the query? The query I want to build has to look up records based on individual months and by fiscal year.
Thanks in advance for the help!
 
Use Datepart("m",[datefield]) to get month and Datepart("yyyy",[datefield]) for year. Sounds like you might want to create these fields as part of your query, rather than after the fact.

HTH
 
Thanks for the reply!
 

Users who are viewing this thread

Back
Top Bottom