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

How to assign BLANK date?

Status
Not open for further replies.

medic

Programmer
Jun 14, 2000
459
US
I'm using VBScript in handling SQL tables in ASP. Is there a way to assign a blank datetime value to a smalldatetime field?

TIA

Medic
 
Nope ... can be Null or the default of 1900-01-01.

Thanks

J. Kusch
 
Here is an associated question then. We end up using ADO to map to a SQLServer 2000 database, and it works very well. However, we find that SQL Server uses 1900-01-01 for a base date and COleDate uses 1899-12-30 for a base "zero" date.

Has anyone else had these kinds of problems? We ended up changing our isZeroDate method to check for the double being <= 2 for a zero date to cover both cases.

thanks,
Jack

Jack De Winter
Software Developer
MedTel Software
 
Thanks guys.
Could have been better if there is a standard blank date like, for example, 0000-00-00 or 00/00/00.

Medic
 
What about a default date of your choosing? Set the default value in design mode for the date field to any value you like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top