HCProfessionals Posted March 19, 2011 Share Posted March 19, 2011 I have the date stored as: date( "d/m/Y" ) After it's pulled from the database, I would like it to display like: date( "F j, Y" ) I have tried below, but the output makes d the month and m the day. $dateStamp = strtotime($row['startrepeat']); $dateFormatted = date("F j, Y", $dateStamp); Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 19, 2011 Share Posted March 19, 2011 The time should be stored in the YYYY-MM-DD format, in a field with the appropriate data type. What you have above isn't a date as far as the DB and php are concerned, it's a string. Is it too late to change the database so it's set up properly? 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.