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!

MS Access Query - Date/Month 1

Status
Not open for further replies.

Pilly170

IS-IT--Management
Aug 28, 2003
36
US
hi,

I have year/month data held within a sql server, its held like YYMM, What im trying to do is to run a macro that runs this query that will automatically detect the current year and month eg 0409 for this month. Im pretty sure it would be Date() command but not sure of the syntax, can anyone help??
 
I think you are looking for a criteria/expression that returns the current year and month in the format YYMM. If so, use the expression:
Format(Date(),"yymm")

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Pilly170,

You need to check the Data Type of this field to determine if its a REAL DATE or not.

Let us know.

Skip,

[glasses] [red]Be advised:[/red] When transmitting sheet music...
If it ain't baroque, don't fax it! [tongue]
 
dhookom - you were spot on... cheers!.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top