Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI OLEDB Enterprise

Date

  • Last UpdatedFeb 07, 2023
  • 1 minute read

DateTime DATE (timestampLiteral WString = ' * ', referenceTimestamp DateTime = ' * ' )

Converts a timestamp literal into a timestamp. You can use the second arguments to set the reference timestamp for relative literals.

Examples

Description

Function

Beginning of the current month

SELECT DATE ('01')

Beginning of the current year

SELECT DATE ('01-01')

First day of year 2017

SELECT DATE ('01-2017')

Day 150 of year 2016

SELECT DATE ('+150d','01-Jan-2016 00:00:00)

365 days after the first of the current year

SELECT DATE ('+365d','01-01')

Current day of the month in January

SELECT DATE ('Jan')

or

SELECT DATE ('Today','Jan')

Last Monday before first of July

SELECT DATE ('Monday','07-01')

First Monday of the current month

SELECT DATE ('Monday+7d','01')

Last Monday

SELECT DATE ('Monday','Today')

Related Links
TitleResults for “How to create a CRG?”Also Available in