This topic is locked

query against time field

7/23/2009 4:09:29 AM
ASPRunnerPro General questions
G
guroos author

I have a field containing date and time. If I want to run a query against the data just showing todays date I get no records returned because of the time data. Doing some research on the net I found the solution should be to make a query that adds a calculated field that formats the data to dd/mm/yy and then query that calculated field.
Could not get this to work in ASPRunner so I added the query to the database and in ASPRunner SQL editor mode run the results and it works fine. However when I build the DB it returns no records. Any suggestions?

J
Jane 7/23/2009
G
guroos author 7/23/2009

Please check this thread:

http://www.asprunner.com/forums/index.php?showtopic=12376


Thank you for your quick response. Maybe it's because I'm using Access and not SQL, but it didn't work for me. But it did put me on the right path, so for anyone else looking I got it working with:
[codebox]datediff('y', field_name, Date())=0[/codebox]