WHY am I getting this error? (Date function)

Myriad_Rocker

Questioning Reality
Local time
Today, 12:31
Joined
Mar 26, 2004
Messages
166
I don't get it!!!! I use it all the time. <=Date() should get all rows with no future dates...but I get this error on some of my queries...I've never got this error before... :mad: :mad: :mad: :mad:

Sorry about the poor image quality.
 

Attachments

  • Image1.jpg
    Image1.jpg
    8.8 KB · Views: 248
From this site:

The string representation of a datetime value is out of range.

Explanation: The string representation of a date, time or timestamp value contains a value that is out of range.

This error could be caused by accessing a datetime value from an application using a country code whose datetime format is different than the one used by the application that created it. For example, a string datetime value stored in the format dd/mm/yyyy will not be valid when read by an application expecting its format to be mm/dd/yyyy.

The correct ranges for date, time, or timestamp values are as follows:

* 0001 to 9999 for years.
* 1 to 12 for months.
* 1 to 31 for days when the month is 1, 3, 5, 7, 8, 10, and 12.
* 1 to 30 for days when the month is 4, 6, 9, 11.
* 1 to 28 for days when the month is 2 in a non-leap year.
* 1 to 29 for days when the month is 2 in a leap year.
* 0 to 24 for hours. If the hour is 24, the other parts of the time are 0. If the format is USA, the hour cannot be greater than 12.
* 0 to 59 for minutes.
* 0 to 59 for seconds.
* 0 to 999999 for microseconds.
* 001 to 365 for the day portion of a Julian calendar date when the year is not a leap year.
* 001 to 366 for the day portion of a Julian calendar date when the year is a leap year.

Federated system users: the problem might be due to a date/time representation problem at the data source. Refer to the data source's documentation for the ranges for date and time values at the data source. If the reason is unknown, isolate the problem to the data source failing the request (see the Troubleshooting Guide) and examine the date/time representation restrictions for that data source.

The statement cannot be processed.

User Response: Ensure that the value is within the valid range, and the application's datetime format is the same as the string value.
 

Users who are viewing this thread

Back
Top Bottom