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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.