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

Seconds missing when insert datetime into SQL database

Status
Not open for further replies.

christer99

IS-IT--Management
Dec 3, 2001
247
When interserting date and time from an ASP page using Recordset.Update commanded, into a SQL database, the seconds are missing. It is working, if I do the same insert directly from SQL, but not from the ASP page. The seconds are missing so instead of 3:15:22 PM, 3:15:00 PM is being inserted. Any help would be appreciated. It is not a SQL issue as it is working directly on the SQL Server. The SQL field is DATETIME (and not SMALLDATE).
 
Can you show us the asp that generates the update? I usually collect the query into a string and use a Response.Write to see exactly what the update statement is.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
What about if you use the ADO Connection object's Execute method to run an SQL command like an INSERT or an UPDATE?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top