Brian Dunning's FileMaker Custom Functions

JulianDecoder ( JulianDate )

This function takes a Julian date code and returns a timestamp

  Average rating: 4.9 (24 votes) Log in to vote

Roger Biel   Roger Biel
2Geckos Consulting, LLC
www.2geckos.com

Share on Facebook Share on Twitter

  Sample input:
JulianDecoder( 1213825758 )
  Sample output:
6/26/2008 9:49:18 PM

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

This function takes a Julian date code and returns a timestamp
Julian date is the number of seconds since Jan 1st 1970

work backwards starting with seconds and then subtract seconds to get minutes, etc…

In conjunction with Julian function this becomes a powerful way to perform math with the date.

Although not a true Julian date, for all practical purposes 1970 is sufficient.
Leap year, Time zone, and DST are irrelevant, this is just decoding the Julian date generated by the Julian custom function.

 

Comments

comment   comment, VR
Feb 24, 2012
"Julian date is the number of seconds since Jan 1st 1970."

I am afraid you are mistaken: Julian date is the number of days since January 1, 4713 BC (in Julian calendar). The number of seconds since January 1, 1970 is commonly referred to as Unix time.

Converting Unix time to Filemaker timestamp is rather trivial =

UnixTime + 62135596800

though properly one should also account for the time zone and daylight offset.
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.