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 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) 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
Archived
This topic is now archived and is closed to further replies.