Search code examples
datedatetimetimestamptype-conversionfilemaker

Convert FM (FileMaker) timestamp to DateTime


I have some FileMaker timestamp which I don't know how to handle. (I discovered it by trial...)

Does someone know an algorithm to convert FM (File Maker) timestamp into DateTime?

I have read about the format on this page. Which includes a "FM dec Timestamp" button which makes the desired conversion, but gives no reference on how it does so!

Also, my timestamps differs in format from the one required in the site, mine has a size of 18 digits, whearas the site only allows 11.

Inserting 634890864000000000 and removing the trailing zeroes (to leave 11 digits), I got this date:

Wednesday, 2012-11-21 10:20:00

Solution

  • If you have FileMaker this should be as simple as:

    1. Importing the number as text,
    2. Making a new calculation field, resultingTimestamp, which takes the left 11 characters and converts to a TimeStamp:

      GetAsTimestamp( Left( myImportedTimestamp ; 11 ) )
      
    3. Doing conversion to Unix format, either programmatically or through display on the resultingTimestamp field on a Layout.

    If you don't have FileMaker:

    1. Take the left 11 digits of the FileMaker timestamp.
    2. Subtract 62135596800 from the FileMaker timestamp to get the Unix (epoch) timestamp.
      (Verified by taking the same date in each and subtracting the FileMaker date from the Unix date.)
    3. Convert epoch time to human readable, for example according to one of the formulas found in the "Convert from epoch to human readable date" section of epochconverter.com.