Jump to content


Photo

Update a timestamp field?


  • Please log in to reply
1 reply to this topic

#1 realtek

realtek
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 26 May 2003 - 11:33 AM

Hi,

I am aware of how to use the update query.

However, could someone please advise me of how to update a timestamp field, seeing as the timestamp is automatically generated?

Thanks!,

Nick

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 26 May 2003 - 12:32 PM

As u said time stamp is the value at the point of record insertion.

and u can have varying length

TIMESTAMP(14) YYYYMMDDHHMMSS
TIMESTAMP(12) YYMMDDHHMMSS
TIMESTAMP(10) YYMMDDHHMM
TIMESTAMP(8) YYYYMMDD
TIMESTAMP(6) YYMMDD
TIMESTAMP(4) YYMM


u can use something like ( example) this

update test set dt=\'20030523203030\'

If dont give the correct format u will just see 0000000 being updated

So check the value u have given in time stamp!
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users