delickate Posted June 21, 2008 Share Posted June 21, 2008 hi guys, i'm writing date manually in textbox in a format llike 20/02/2008 and i want to show this date in any where like 20 feb, 2008. it means that i want to change the date format. can any one help me plz Link to comment https://forums.phpfreaks.com/topic/111227-plz-help-change-date-formate/ Share on other sites More sharing options...
thebadbad Posted June 21, 2008 Share Posted June 21, 2008 Hi, this'll do: <?php $date = '20/02/2008'; list($d, $m, $y) = explode('/', $date); $date_format = date('j M, Y', strtotime("$y-$m-$d")); echo $date_format; // 20 Feb, 2008 ?> Link to comment https://forums.phpfreaks.com/topic/111227-plz-help-change-date-formate/#findComment-570887 Share on other sites More sharing options...
DanielWhite Posted June 21, 2008 Share Posted June 21, 2008 What you could do is get the text box to have the current date already set in Unix time and then on the page it shows up on just set the unix stamp to show the date the way you want it. See: http://www.php.net/date Link to comment https://forums.phpfreaks.com/topic/111227-plz-help-change-date-formate/#findComment-570888 Share on other sites More sharing options...
Barand Posted June 21, 2008 Share Posted June 21, 2008 My clients would love that [pre] +----------------+ Date | | Note to users: Please enter dates in unix-time format (eg 1203465600) +----------------+ Link to comment https://forums.phpfreaks.com/topic/111227-plz-help-change-date-formate/#findComment-570895 Share on other sites More sharing options...
thebadbad Posted June 21, 2008 Share Posted June 21, 2008 @Barand LOL Link to comment https://forums.phpfreaks.com/topic/111227-plz-help-change-date-formate/#findComment-570899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.