Edit

Share via

Facebook x.com LinkedIn Email

GetCurrentTicks (NoSQL query)

  • 2024年08月22日

APPLIES TO: NoSQL

Returns the number of 100-nanosecond ticks that have elapsed since 00:00:00 Thursday, 1 January 1970.

Syntax

GetCurrentTicks()

Return types

Returns a signed numeric value that represents the current number of 100-nanosecond ticks that have elapsed since the Unix epoch (00:00:00 Thursday, 1 January 1970).

Examples

The following example returns the current time measured in ticks:

SELECT VALUE {
 currentTicks: GetCurrentTicks()
}
[
 {
 "currentTicks": 15973607943002652
 }
]

Remarks

  • This function is nondeterministic.
  • The result returned is UTC (Coordinated Universal Time).
  • This function doesn't use the index.
  • If you need to compare values to the current time, obtain the current time before query execution and use that constant string value in the WHERE clause.