Previous Topic

Next Topic

Extract - SQL Function

Extract(DateTime: String From Expr1: String): String

Extract returns the value of a specified DateTime field from Expr1. This can be useful for manipulating date and time fields in large tables.

Extract function syntax has these named arguments:

Parameter

Description

DateTime

Required. The date or time field to be returned. Select from:

  • Year
  • Month
  • Day
  • Hour
  • Minute
  • Second

Expr1

Required. The date, time or timestamp field.

For example:

Select Extract(Year from DateOfLastSale) From ARCUST

See Also

SQL Date Functions

Book Contents

Book Index