Timestamp
Moderator: General Moderators
-
thoughtriot
- Forum Commoner
- Posts: 26
- Joined: Thu Nov 07, 2002 9:32 pm
Timestamp
Ok, I have a timestamp field in a table, and I can insert values into it fine, but how would I extract the field in the format m.d.y? Because if I just extract the timestamp field normally like all the other fields, it comes out in a format I don't want. And also, how would I echo the timestamp field after I extract it. Thanks.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You can format the timestamp using MySQL's DATE_FORMAT function:
http://www.mysql.com/doc/en/Date_and_ti ... ml#IDX1282
Then you can just echo the result without doing anything to it.
Mac
http://www.mysql.com/doc/en/Date_and_ti ... ml#IDX1282
Then you can just echo the result without doing anything to it.
Mac