Reference > Functions reference > Get functions > Get(CurrentHostTimestamp)
 

Get(CurrentHostTimestamp)

Returns the host's current date and time (to the nearest second) according to the system clock.

Format 

Get ( CurrentHostTimestamp )

Parameters 

None

Data type returned 

timestamp

Originated in 

FileMaker Pro 7.0

Description 

The data type of a calculation result determines how the returned value of this function is represented.

 

If the calculation result is

This function returns

timestamp or text

The current date and time in the format determined by the operating system settings when the file was created

Note  If the number of seconds is zero, seconds are not included—for example, 1/1/2019 11:30 AM.

a number

The total number of seconds elapsed since midnight on January 1, 0001

Notes 

The client machine and host machine may be in different times zones so Get(CurrentHostTimestamp) and Get(CurrentTimestamp) may return different date/time values. Also, the current date and time are characteristics of the host system, but the format of the date and time is a characteristic of the database file.

In FileMaker Cloud products, this function returns the date and time in Coordinated Universal Time (UTC). If you want the date and time in the host's local time zone, you must adjust the value returned by this function by the difference between UTC and the host's time zone. See Example 2.

Important  For users who are connected over a network, the Get(CurrentHostTimestamp) function can affect the performance of the database file. For example, if you use the function in an unstored calculation field, and the field is visible in a list view, each display of the field requires an additional network access. Stored calculation fields are a better use of the function. For example, if you automatically enter a timestamp for each newly created record using a stored calculation field, you minimize network access.

Example 1 

Returns 1/1/2019 11:30:01 AM when the system clock shows January 1, 2019 11:30:01 AM on the host machine.

Example 2 

For a FileMaker Cloud product hosted in the US/Pacific time zone, returns the host's local time as 12/31/2018 6:19:01 PM Pacific Standard Time (UTC – 8:00) when Get(CurrentHostTimestamp) returns 1/1/2019 2:19:01 AM UTC.

Get ( CurrentHostTimestamp ) - 8 * 3600

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas