Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The DateDiff()
function calculates the difference between two dates. You can use the DateDiff for the difference in: year, month, week, day, hour, minute or second.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number that is the difference between two dates in a specific unit. If one of the two dates is unknown then this function returns unknown.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
Name | Type | Required | Description |
---|---|---|---|
start_date
date time
the start date
end_date
date time
the end date
unit
Keyword
the date unit of which the difference is calculated. Possible values: years, months, weeks, day, hour, minute or second.
The DateOnly()
function only returns the date part without the time part of a date.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the date only.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
The DatePart()
function retrieves a part from a date. For example, the year, the month, the week, the day, the hour, the minutes or the seconds.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number that is a part of a date. If the date is unknown then this function returns unknown.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
The Date()
function accepts numeric values for each part of a date, optionally with time, and returns it as a datetime value.
Returns a Date Time
value compiled from the separate input values for each part.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
The Now()
function returns the current date.
This function is SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the current date with the current time
The Today() function excludes the current time.
datetime
date time
a date
date
date time
a date
unit
keyword
Date unit keyword
Possible values: year, month, week, day, hour, minute or second.
| numeric | the year unit |
| numeric | the month unit (1 - 12) |
| numeric | the day unit (1 - 31) |
| numeric | the hour unit (0 - 23) |
| numeric | the minute unit (0 - 59) |
| numeric | the second unit (0 - 59) |
| date time | a date |
The FromUnixTimestamp()
function converts a unix timestamp to a date.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the date represented by the given unix timestamp
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
This function returns the date in the format settings of your project.
The MoveDate()
function shifts a date by a given amount of a date unit.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new date where a number of units is added/subtracted to/from a date.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
The TimeOfDay()
function returns the duration that represents the fraction of the day that has elapsed since midnight.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the duration that represents the fraction of the day that has elapsed since midnight.
Returns Unknown
if one of the parameter values is unknown or outside the common valid date boundaries.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
The ToLocal()
function converts a UTC date to a local date with the given timezone (TZ database name). You can find the time zones used in wem in the list of .
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is SQL compatible. For more information about SQL compatibility, see our .
The function includes the current time.
timestamp
numeric
A unix timestamp (seconds passed since JAN 01 1970)
date
date time
a date
number
numeric
the number or amount that a date the value is moved.
unit
Keyword
the [date unit] that is moved in date.
Possible values: year, month, week, day, hour, minute or second.
datetime
date time
a specified date and time
| date time | a UTC date value |
| text | full timezone name |
The ToDuration()
function converts provided input to a specific Duration value. Possible values are a string ("dd.HH:mm:ss.fff"), ticks, a number with specified date-unit or specific numeric values for days, hours, minutes, seconds and milliseconds.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a Duration
value compiled from the input values.
Returns Unknown
if one of the parameter values is unknown or outside the common valid boundaries.
ToDuration(650000000)
Result: 1 minute and 5 seconds
ToDuration(50000000)
Result: 5 seconds
ToDuration(unknownnumber)
Result: unknown
ToDuration(6, day)
Result: 6 days
ToDuration(12, hour)
Result: 12 hours
ToDuration(14, minute)
Result: 14 minutes
ToDuration(45, second)
Result: 45 seconds
ToDuration(768, millisecond)
Result: 768 milliseconds
ToDuration(6, 12, 14, 45, 768)
Result: 6 days, 12 hours, 14 minutes, 45 seconds and 768 milliseconds
ToDuration( 0, 0, 14, 45, 0)
Result: 14 minutes and 45 seconds
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
text
text
text containing duration in dd.HH:mm:ss:fff form
ticks
numeric
the number of ticks (tenthousandth of a millisecond)
number
numeric
a numeric value to combine with the date_unit
date_unit
keyword
one of the date_units: day, hour, minute, second, millisecond
day
numeric
the day unit (number of days)
hour
numeric
the hour unit (0 - 23)
minute
numeric
the minute unit (0 - 59)
second
numeric
the second unit (0 - 59)
millisecond
numeric
the millisecond unit (0 - 999)
| date time | a date value |
WIKI:
This function is SQL compatible. For more information about SQL compatibility, see our .
The ToUTC()
function converts a local date with the given timezone (TZ database name) to a UTC date. You can find the time zones used in wem in the list of IANA Standard Time zones.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a UTC date.
Returns null
if the time zone argument is not recognized
Name | Type | Required | Description |
---|---|---|---|
date
date time
a date value
timezone
text
Full timezone name. You can find the different names in the portal settings.
The UTCNow()
returns the current date and time in UTC.
WIKI: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
This function is SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the current date and time in UTC.