Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: david Panter
Added: Aug 28, 2019 1:25 PM
Views: 5
Tags: no tags
  1.  $timeint = ($record['shl.date_code']-1);
  2. $date = new DateTime('0001-01-01');
  3. $interval = new DateInterval('P'.$timeint.'D');
  4. $date->add($interval);
  5. //Add the DateInterval object to our DateTime object.
  6. $result = $date->format("Y-m-d");
  7.  
  8.  $record['shl.date_code'] = dateFormat(@$result);