Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Formula to convert date to numbers

Topic Labels: Formulas
Solved
Jump to Solution
1192 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Edoardo_Stefani
4 - Data Explorer
4 - Data Explorer

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?

1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

Welcome to the community, @Edoardo_StefaniL!

Use the YEAR function instead:

YEAR(Date)

See Solution in Thread

1 Reply 1
ScottWorld
18 - Pluto
18 - Pluto

Welcome to the community, @Edoardo_StefaniL!

Use the YEAR function instead:

YEAR(Date)