gudfry Posted August 8, 2008 Share Posted August 8, 2008 hi all; i have found a code that would generate a time and date, this works fine, my main goal is i want to change the date and time format. here is the code that i found, mysql_query("INSERT INTO mailrecord set date=CURDATE(), time=CURTIME()"); this format will output CURTIME() : 14:13:32 CURDATE() : 2008-08-08 hope anyone can tell me where can i find a good source to output this format CURTIME() : 1:13:32pm CURDATE() : friday : 08 : 2008 Quote Link to comment https://forums.phpfreaks.com/topic/118740-date-format-need-to-change-how-please/ Share on other sites More sharing options...
dannyb785 Posted August 8, 2008 Share Posted August 8, 2008 I do all date formats with the php function strtotime(). that way you can easily convert the number into any sort of date format(time, month, day, year, etc) Quote Link to comment https://forums.phpfreaks.com/topic/118740-date-format-need-to-change-how-please/#findComment-611369 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.