seran128 Posted December 6, 2006 Share Posted December 6, 2006 I get a date from a query string like 12/05/2006 I need to convert that to a long date like Tuesday December 5, 2006 Link to comment https://forums.phpfreaks.com/topic/29609-short-to-long-date/ Share on other sites More sharing options...
redarrow Posted December 6, 2006 Share Posted December 6, 2006 i sugestyou convert the current date to a timestamp then use the php.net for the correct format needed then format the date as needed. Link to comment https://forums.phpfreaks.com/topic/29609-short-to-long-date/#findComment-135865 Share on other sites More sharing options...
willfitch Posted December 6, 2006 Share Posted December 6, 2006 [code=php:0]<?php$rec_date = '12/05/2006';$date_arr = explode('/',$rec_date);echo date('l F j, Y',mktime(0,0,0,$date_arr[0],$date_arr[1],$date_arr[2]));?>[/code] Link to comment https://forums.phpfreaks.com/topic/29609-short-to-long-date/#findComment-135867 Share on other sites More sharing options...
willfitch Posted December 6, 2006 Share Posted December 6, 2006 If you are receiving this from MySQL, you should consider using the DATE_FORMAT function. Link to comment https://forums.phpfreaks.com/topic/29609-short-to-long-date/#findComment-135868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.