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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format dateTime field in Criteria field

Status
Not open for further replies.

LebronJames

Programmer
Apr 5, 2003
93
0
0
This is my query in Access:
SELECT Table1.DateEntered, Table1.LName, Format(CDate(nz([Table1].[DateText])),"yyyy\/mm\/dd") AS Expr1
FROM Table1
WHERE (((Format(CDate(nz([Table1].[DateText])),"yyyy\/mm\/dd"))>=Format(#1/1/2004#,"yyyy\mm\dd")));


In design view, there is a criteria field, here I want to to say give me the fields where the DateText are >= 2003/01/01 01:00:00 in that format... Problem is Access changes the format of the date in the criteria field...
 
Replace this:
>=Format(#1/1/2004#,"yyyy\mm\dd")
By this:
>='2004/01/01'



Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top