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:
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
12.3
12.4
Statistic
FMM
Blog
JS.UTCDateToTime
Converts date to time value.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JavaScript | 10.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
JSRef | The JavaScript reference number. | $js |
TS | The timestamp to convert. Must be in UTC timezone. |
Result
Returns double or error.
Description
Converts date to time value.Convert components (year, month, day, hour, minute, seconds) in timestamp, interpreted in UTC, into a time value.
Examples
Tests time functions:
Let([
c = MBS( "JS.New" );
r = MBS( "JS.UTCDateToTime"; c; Get(CurrentTimeStamp) );
d = MBS( "JS.TimeToDateComponents"; c; r )
]; r & ¶ & d)
Example result:
1582121231000
{
"year": 2020,
"month": 2,
"day": 19,
"hours": 14,
"minutes": 7,
"seconds": 11,
"milliseconds": 0,
"weekday": 3,
"timezone": "UTC",
"weekdayText": "Wednesday"
}
See also
Release notes
- Version 11.2
- Added milliseconds for timestamps in JS.TimeToUTCDate and JS.UTCDateToTime functions.
- Version 10.4
- Fixed month for JS.UTCDateToTime function.
- Version 10.1
- Added time functions for JavaScript functions: JS.Now, JS.TimeToDateComponents, JS.TimeToUTCDate and JS.UTCDateToTime.
Blog Entries
- MBS FileMaker Plugin, version 11.2pr6
- MBS FileMaker Plugin, version 10.4pr5
- New in the MBS FileMaker Plugin 10.1
- MBS FileMaker Plugin, version 10.1pr1
Created 19th January 2020, last changed 19th January 2020
JS.TimeToUTCDate - JSON.AddArrayToArray
Feedback: Report problem or ask question.
