Posted By

digitalmcgrath on 09/27/11


Tagged

php date DateTime


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

sharktale
tux-world


Date Converter


 / Published in: PHP
 

This simple function will convert a date field of "yyyy-mm-dd" to "mm/dd/yyyy"

  1. function returnFormattedDate($cdate){
  2. list($year,$month,$day)=explode("-",$cdate);
  3. return $month."/".$day."/".$year;
  4. }

Report this snippet  

You need to login to post a comment.