I've written a query that compares a date field in a database to the current date. It works fine on one computer but not on another. The problem is that one computer returns the date with a 4 digit year and the other 2.
The date field in the database is YYYYMMDD
I've written this to convert the Now() value to the same format.
Date: Val(Mid(Now(),7,4) & Left(Now(),2) & Mid(Now(),4,2))
This works on computer 1.
Now() Returns:
Computer 1 - Windows 2000 + Access 2000
12/26/2003 2:11:51 PM
Computer 2 - Windows NT4 + Access 2000
12/26/03 2:11:51 PM
Is there any way to change the date format returned so I don't have to have a query for each machine?
If I can't change the date format, is there a way to write the query to work on both machines?
Does this have anything to do with the OS since both machines are running the same version of Access?
The date field in the database is YYYYMMDD
I've written this to convert the Now() value to the same format.
Date: Val(Mid(Now(),7,4) & Left(Now(),2) & Mid(Now(),4,2))
This works on computer 1.
Now() Returns:
Computer 1 - Windows 2000 + Access 2000
12/26/2003 2:11:51 PM
Computer 2 - Windows NT4 + Access 2000
12/26/03 2:11:51 PM
Is there any way to change the date format returned so I don't have to have a query for each machine?
If I can't change the date format, is there a way to write the query to work on both machines?
Does this have anything to do with the OS since both machines are running the same version of Access?