PHP Date Format


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $event_start_date=$values['starttime'];
  2. $getdate=explode('-',$event_start_date);
  3. $correct_date=explode(' ',$getdate[2]);
  4. $time = explode(':',$correct_date[1]);
  5. $my_date1=mktime($time[0],$time[1],$time[2],$getdate[1],$correct_date[0],$getdate[0]);
  6. $my_month=strtoupper(date("M",$my_date1));
  7. $my_date=date("d",$my_date1);
  8. $my_time=date("H:i a",$my_date1);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.