Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  


Converts date to time value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JavaScript 10.1 Yes Yes Yes Yes Yes
MBS( "JS.UTCDateToTime"; JSRef; TS )   More


Parameter Description Example
JSRef The JavaScript reference number. $js
TS The timestamp to convert.
Must be in UTC timezone.


Returns double or error.


Converts date to time value.
Convert components (year, month, day, hour, minute, seconds) in timestamp, interpreted in UTC, into a time value.


Tests time functions:

c = MBS( "JS.New" );
r = MBS( "JS.UTCDateToTime"; c; Get(CurrentTimeStamp) );
d = MBS( "JS.TimeToDateComponents"; c; r )
]; r & ¶ & d)

Example result:
  "year":   2020,
  "month":   2,
  "day":   19,
  "hours":   14,
  "minutes":   7,
  "seconds":   11,
  "milliseconds":   0,
  "weekday":   3,
  "timezone":   "UTC",
  "weekdayText":   "Wednesday"

See also

Blog Entries

Release notes

Created 19th January 2020, last changed 19th January 2020

JS.TimeToUTCDate   -   JSON.AddArrayToArray

Feedback: Report problem or ask question.

MBS FileMaker blog