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!

problem with now() after changing field from text to date/time

Status
Not open for further replies.

lshippee

Technical User
Jul 19, 2000
36
0
0
US
I have a database built from form fields in a web form which included a date field that was initially set to a text data type. I can sort with this field but can not perform calculations or use date/time functions. I want to construct a macro or delete query in the Access2000 database that will select all records prior to the current date and delete them. I need a date/time field in order to use the Now() function, so I changed the datatype from text to date/time. This database (part of a web site) is still under development and currently contains all bogus data which will be deleted before going live.

I can not get am Access database query to produce results using now() as criteria in the date field -- 0 records returned even though several entries have been made to the database since changing the data type in the database table, form, etc.

Any idease about how to resolve the problem(s)? All suggestions and comments appreciated.

 

Please post you query. Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
not sure if i've got the right end of the stick here but have you tried date() instead of now(). If this doesnt help can you post more info.
 
I am willing to post my query -- how do I do this?
 
Thanks! I got the query to run properly by changing to date().

 

lshippee,

I'm glad you got the query to work. For future reference, do the following to post a query from Access.[ol][li]Open the query designer.
[li]On the left end of the toolbar you can select SQL View. (This is also available on the View menu.)
[li]After you select SQL View, copy the query to the clipboard.
[li]Paste the query into the forum message box.[/ol] Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top