
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 01, 2021 01:46 AM
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?
Solved! Go to Solution.
1 Solution
Accepted Solutions

Solved
See Solution in Thread
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 01, 2021 03:03 AM
Welcome to the community, @Edoardo_StefaniL!
Use the YEAR function instead:
YEAR(Date)
Reply
1 Reply 1

Solved
See Solution in Thread
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 01, 2021 03:03 AM
Welcome to the community, @Edoardo_StefaniL!
Use the YEAR function instead:
YEAR(Date)
Reply
