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!

Can I do an UPDATE on a Timestamp field???

Status
Not open for further replies.

gradinumcp

IS-IT--Management
Apr 6, 2005
85
US
Hi! I am creating a time management system whereby the administrator can go in and UPDATE an existing Timestamp field with a new time.

I have the administrator input the date and time in a textbox.

Any clue how he can update the field with this new data??? The table TimeTable has columns like TimeStamp, DateStamp and UserID besides Autonum.

I think it should be something like...

UPDATE TimeTable set TimeStamp=06/29/2005 12:45:56 PM where UserID=10 and DateStamp=06/29/2005

This however errors on me--any clues???

 
Try:

... set TimeStamp='2005-06-29 12:45:56' where ...

 
Thanks lgarner--it says query executed succesfully. But does not update the database at all.

Any clues???
 
Depending on the version and the DB type you're using TIMESTAMP values will behave differently for details:

________________________________________________________________
If you want to get 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
 
Thanks Guys that worked. However when i try to integrate it into my ASP code, it doesn't work. Maybe I will post it in the ASP forum.

However the SQL query works well:)

Thanks Again!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top