portableSql
Year Portable SQL Function
Syntax
Year as N (DateTime as D)
Year as N (DateTime as T)
Arguments
- DateTimeDate Time
A field or value.
Returns
- resultNumeric
Returns the year from a date or datetime value.
Description
Extract the year from a date or datetime value.
Discussion
The Year function extracts the year from a date or datetime value.
Year() function executed on the Northwind Access database
SELECT FIRST 1 CurrentDateTime() AS Now, Year(CurrentDateTime()) AS Expr1 FROM Orders =10/10/2019 12:45:57 00 pm|2019