Main Content

FileMaker Day to Unix Time conversion

Archive - Originally posted on "The Horse's Mouth" - 2015-02-15 13:57:45 - Graham Ellis

Posting here out of self defence ... this is always one I forget and it doesn't seem to come up on the searches. Coded in PHP.

  # 735540 3/11/2014
  $timeoffset = 735540 - mktime(12,0,0,11,3,2014) / 3600 / 24;
  $daychanged = ($_REQUEST[whichday] - $timeoffset);
  $report = date("D jS M Y",$daychanged * 3600 * 24);

Very inefficient, but converts a day number from the FileMaker data I have into a Unix TimeStamp, which I have then formatted to report on Day. Month and Year (and day of week too) in my output.

My users far prefer "3rd November 2014" to "735540"!