arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Extract

This section contains reference documentation for the Extract function.

Returns the selected field from the DATETIME expression.

hashtag
Signature

EXTRACT(field FROM expression)

hashtag
Usage Examples

value
value
select EXTRACT(MONTH FROM '2017-06-15')

06

select EXTRACT(YEAR FROM '2017-06-15 09:34:21')

2017