
September 29th, 2001, 11:54 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
SOS - CDate function 'out of range value' error
Originally posted by : Thea (T.Peacock@ncl.ac.uk)I'm creating an application that takes values from a web form and inserts them into a SQL Server database. I have a problem with converting a string into a date type using the CDate function. SQL Server is set to UK date format (dd-mm-yyyy), but I found it necessary to input a date in the US format(mm-dd-yyyy) from the web page. Fine. However, I get 'out of range value' error using CDate(date) (where date=value from web page) if 'mm' or 'dd' exceeds 12, i.e. 12-12-2001 works, but not 13-12-2001 or 12-13-2001. Please can anyone help?
|