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 Quote Link to comment 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 ?> Quote Link to comment 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 Quote Link to comment 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) +----------------+ Quote Link to comment Share on other sites More sharing options...
thebadbad Posted June 21, 2008 Share Posted June 21, 2008 @Barand LOL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.