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

Hijra Date

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I enter Hijra date (arabic date) in my Sql Server

i am getting this error whenever I tried to enter year below 1900

-----------------------------------------------------------
Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
-----------------------------------------------------------

Im using SQL 2000 Server Standard Edition under Windows NT 4.0 (English Edition)

Pls help ...
 
For AH dates where the year is going to be in the 1400 range, you should use a CHAR datatype or some other workaround. This is because the DateTime data type has a range for Date and time data from January 1, 1753, to December 31, 9999. Thus, AH years such as 1414 are beyond the DateTime valid range.

Granted, you won't be able to use the CHAR type to do date math, but you can't reliably use date math on AH dates anyway, since the number of days in each month and year differ from the CE algorithm.

'eid mubarak wa salaam.

Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top