Brian Dunning's FileMaker Custom Functions

MySQL_DateTime_to_TimeStamp ( DateTime )

Convert MySQL DateTime value to FileMaker TimeStamp

  Average rating: 4.0 (35 votes) Log in to vote

Andy Knasinski   Andy Knasinski - Show more from this author
nrg software, llc.

Share on Facebook Share on Twitter

  Sample input:
MySQL_DateTime_to_TimeStamp ( "2006-12-18 14:57:30" )
  Sample output:
12/18/2006 2:57:30 PM

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This custom function converts a MySQL (4.1) DataTime value to a FileMaker Pro TimeStamp format.



Woz   Woz, Perth
Apr 19, 2015
Warning: This outputs US format dates only (mm/dd/yyyy)
John Buckingham   John Buckingham, microGuidance
Aug 3, 2017
Thanks, Andy, for posting this...

Re: Woz's post; I amended the function as follows to output the date in the user's date format:

Timestamp (
Date ( Middle ( DateTime ; 6 ; 2 ) ; Middle ( DateTime ; 9 ; 2 ) ; Left ( DateTime ; 4 ) ) ;
GetAsTime ( RightWords ( DateTime ; 1 ) )

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: