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

Type Mismatch when comparing dates

Status
Not open for further replies.

Markita

Programmer
Feb 20, 2001
3
AU
I have an update query that compares dates. I use #" & theDate & "# in the SQL string to reference the date variable but my problem is that this does not work on all the machines I have tested the database on. All my dates have the format shot date.

Can anybody help me?
 
DateValue(date)

The required date argument is normally a string expression representing a date from January 1, 100 through December 31, 9999. However, date can also be any expression that can represent a date, a time, or both a date and time, in that range.
If date is a string that includes only numbers separated by valid date separators, DateValue recognizes the order for month, day, and year according to the Short Date format you specified for your system. DateValue also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/1991 and 12/30/91, DateValue also recognizes December 30, 1991 and Dec 30, 1991.

If the year part of date is omitted, DateValue uses the current year from your computer's system date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top