I extract only year from date field with DATETIME_FORMAT(Date, 'YYYY')
and assign it to new field.
If I order by that field it isn’t recognized as number, but as a string (the option is A-Z or Z-A).
How can I change it to a number?
I extract only year from date field with DATETIME_FORMAT(Date, 'YYYY')
and assign it to new field.
If I order by that field it isn’t recognized as number, but as a string (the option is A-Z or Z-A).
How can I change it to a number?
Welcome to the community, @Edoardo_StefaniL!
Use the YEAR function instead:
YEAR(Date)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.