I used this to extract year from datetime:
select extract(year from orders.OrderDate)
It gave me year with one decimal. e.g. 2019.0
Why is this? Any feedback would be appreciated!
I also tried:
YEAR(column)
DATEPART(year, column)
None of these worked.
New contributor
lu yan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.