Chevy Posted June 14, 2007 Share Posted June 14, 2007 How can I get my timestamp to output to a date Example: $time = time(); $date = date("F jS, Y"); How would I get the $time to turn into the $date? Link to comment https://forums.phpfreaks.com/topic/55597-solved-time-to-date/ Share on other sites More sharing options...
Chevy Posted June 14, 2007 Author Share Posted June 14, 2007 Sorry I have solved this Link to comment https://forums.phpfreaks.com/topic/55597-solved-time-to-date/#findComment-274679 Share on other sites More sharing options...
Illusion Posted June 14, 2007 Share Posted June 14, 2007 It defaults to current time stamp even if you don't pass the second argument for the date function. If you want to pass specified time stamp , you can use mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] like echo date("M-d-Y", mktime(0, 0, 0, 12, 32, 1997)); Link to comment https://forums.phpfreaks.com/topic/55597-solved-time-to-date/#findComment-274684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.