Jump to content

Date Problem?


adilmarwat
 Share

Recommended Posts

I am using mysql and want to know about the mysql Dare datatyep.I have enter the data as 05-03-2010. on display it shows it as 2010-03-05.I want to set the mysql as 05-03-2010 forever when i display the date. please help. Adil

Edited by adilmarwat
Link to comment
Share on other sites

From the database you can always use strtotime and then use date to display it.Example:

$variable = '2010-03-05'; // Timestamp$date = date('d-m-Y', strtotime($variable)); // day - month - yearecho 'original variable: '.$variable.'<br>the date is '.$date;

Hope it helps!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...