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!

About timestamp 1

Status
Not open for further replies.

mrdance

Programmer
Apr 17, 2001
308
SE
1. How can I select and format the timestamp to, for example YYYY-MM-DD?

2. Timestamp updates only the row inserted not the whole table, right?

thanks

--- neteject.com - Internet Solutions ---
 
You could use:[tt]
SELECT LEFT(timestampfield,10) FROM tblname;
[/tt]or:[tt]
SELECT DATE_FORMAT(timestampfield,"%Y-%m-%d') FROM tblname;
[/tt]

If you insert or update a record with a timestamp field without assigning a value to the timestamp, then the field will be set to the current date/time. This applies only to the record being inserted or updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top