Jump to content

[SOLVED] date format question


alemapo

Recommended Posts

Hi,

I apologize because this is a newbie question.  I am programming with dreamweaver/php using mysql for database.  I have a file containing user entered data and for the entry date I am using a field type "timestamp" and have it set in mysql to CURRENT_TIMESTAMP.  I am now trying to format the date only to the screen for display in the format mm-dd-yyyy.  I have read book after book and online and can't get a grasp on how to format that data stored in the timestamp field to the screen in the format I want.  All I seem to find is how to use mysql commands to format the current system date.  I can't find how to take the data from mysql in the timestamp format and display on my page as mm-dd-yy. If it would be better for me to store the date in a different way I am open to suggestions.  Thanks in advance for your help!

Pamela

 

My field in mysql is cls_entry_date with type of timestamp.  It is set to default of CURRENT_TIMESTAMP.  I would like to echo with php the date in the format mm-dd-yyy.

 

 

Link to comment
https://forums.phpfreaks.com/topic/164317-solved-date-format-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.