indiantown
Technical User
Hello All,
I need help to display date and time in my script, what I have tried whcih give me output Aug 12th, 2005 but I want to display Aug 12th, 2005 10:30 am (example)
The part of the code I am using is below:
/
/
/
$time_stamp = stripslashes($cats[time_stamp]);
$year = substr($time_stamp, 0, 4);
$month = substr($time_stamp, 4, 2);
$day = substr($time_stamp, 6, 2);
//$hour = substr($time_stamp, 8, 2);
//$min = substr($time_stamp, 10, 2);
$t = mktime(0, 0, 0, $month, $day, $year);
$date = date('M dS, Y ', $t);
Please suggest what and where I should make the changes to get the displayed format.
regards
I need help to display date and time in my script, what I have tried whcih give me output Aug 12th, 2005 but I want to display Aug 12th, 2005 10:30 am (example)
The part of the code I am using is below:
/
/
/
$time_stamp = stripslashes($cats[time_stamp]);
$year = substr($time_stamp, 0, 4);
$month = substr($time_stamp, 4, 2);
$day = substr($time_stamp, 6, 2);
//$hour = substr($time_stamp, 8, 2);
//$min = substr($time_stamp, 10, 2);
$t = mktime(0, 0, 0, $month, $day, $year);
$date = date('M dS, Y ', $t);
Please suggest what and where I should make the changes to get the displayed format.
regards