Query Access with date time not working

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1023
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Query Access with date time not working

Post by Grovkillen » Wed Apr 08, 2020 3:46 pm

If I do this query using a ODBC Query Tool it works but using DBQuery command it renders a error.

Code: Select all

SELECT * FROM table WHERE modified > #2020-04-08 12:00:00#
But removing the time it work...

Code: Select all

SELECT * FROM table WHERE modified > #2020-04-08#
It's an older MDB file I'm querying.
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Grovkillen
Automation Wizard
Posts: 1023
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Query Access with date time not working

Post by Grovkillen » Wed Apr 08, 2020 4:11 pm

Google was my friend: https://www.thoughtco.com/formatting-da ... ql-1057843

Code: Select all

SELECT * FROM table WHERE modified > #2020-04-08 12.00.00#
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts