Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Time.UnixTimeStamp
Returns the unix time stamp.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Utility | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Time.UnixTimeStamp" { ; timestamp; gmt } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
timestamp | Optional, a FileMaker timestamp to convert. | Get(SystemTimeStamp) | Optional |
gmt | Available in MBS FileMaker Plugin 10.3 or newer. Whether to use GMT as time zone. Pass 1 for GMT or 0 for local. Not used if you query now, e.g. without a timestamp. |
0 | Optional |
Result
Returns time stamp as number.
Description
Returns the unix time stamp.If called with no parameters, returns current time stamp (GMT).
If you pass a timestamp, this timestamp is converted. Be aware that the system timezone is used.
Convert back to FileMaker with Time.UnixTimeStampToFileMaker function.
Examples
Calc current time:
MBS( "Time.UnixTimeStamp"; Get(CurrentTimeStamp) )
Example result: 1481452626
Calc time for date:
MBS( "Time.UnixTimeStamp"; Date ( 5; 5; 1956 ); 0 )
Example result: -431053200
Calc time for date in GMT:
MBS( "Time.UnixTimeStamp"; Date ( 5; 5; 1956 ); 1 )
Example result: -431049600
Calc current time:
MBS( "Time.UnixTimeStamp" )
See also
Release notes
- Version 11.1
- Rewrote Time.UnixTimeStamp function to work for dates before 1970 on Windows.
- Version 10.3
- Added gmt parameter for Time.UnixTimeStamp function.
- Fixed time zone handling for Time.UnixTimeStamp and Time.UnixTimeStampToFileMaker functions.
- Version 8.3
- Added Time.UnixTimeStampToFileMaker function.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 11.1pr7
- MBS FileMaker Plugin, version 10.3pr2
- MBS Filemaker Plugin, version 4.3pr2
- MBS Filemaker Plugin, version 3.2pr7
This function is free to use.
Created 18th August 2014, last changed 26th February 2021
