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

Storing a default datetime field in SQL Server 2000

Status
Not open for further replies.

SonJ

Programmer
Oct 24, 2002
166
GB
Hi,

I have to store a datecreated field in one of my databse tables (SQL Server 2000) and am unsure how to give it the default value of what would be Now() in VBScript. I have tried Now() and upon saving the table, it throws it out as an unrecognised function. I know that it is possible to do, as I have done it before, but cannot remember how to do it.

Any pointers/ help would be much appreciated.

Thanks in advance,

SoniaD



 
Its ok, I have found out how to do it. I needed to use the SQL function of GetDate() rather than the VBScript function of Now()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top