adilmarwat Posted March 5, 2010 Share Posted March 5, 2010 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 Link to comment Share on other sites More sharing options...
Kameloh Posted March 5, 2010 Share Posted March 5, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.