ES|QL date-time functions
ES|QL supports these date-time functions:
DATE_DIFFReturns the difference between two timestamps in the specified unit.
DATE_EXTRACTExtracts parts of a date, like year, month, day, hour.
DATE_FORMATReturns a string representation of a date, in the provided format.
DATE_PARSEParses a string into a date using the specified format.
DATE_TRUNCRounds down a date to the closest interval.
DAY_NAMEReturns the name of the weekday for a date.
MONTH_NAMEReturns the month name for a date.
NOWReturns current date and time.
RANGE_CONTAINSReturns true if a date range contains a given date or sub-range.
RANGE_INTERSECTSReturns true if two date ranges or dates overlap.
RANGE_MAXReturns the end value of a date range.
RANGE_MINReturns the start value of a date range.
RANGE_WITHINReturns true if a date or date range falls within another date range.
TRANGEFilters data for a given time range using the @timestamp attribute.