Help

Dates formatted with DATETIME_FORMAT do not sort correctly

Topic Labels: Formulas
Solved
Jump to Solution
467 2
cancel
Showing results for 
Search instead for 
Did you mean: 
0800-grizzly
7 - App Architect
7 - App Architect

Hi,

Being European but from Nordics, I want to have our dates as d.m.yyyy. This is not a built-in format in Airtable. I have therefore used DATETIME_FORMAT(SET_TIMEZONE(date, 'Finland/Helsinki'), 'D.M.YYYY') in some places where user friendliness is more important than elsewhere.

The problem is, dates formatted this way do not sort correctly in an interface. Here is an example image of that:'

0800grizzly_0-1723996384286.png

Is this a bug in Airtable, or am I doing something wrong?

TIA,

Björn

 

1 Solution

Accepted Solutions

Hello Björn,

I think that's because the result of your formula is of type text and not date. I would suggest to use this field for display purposes only and to sort on the field "date" called in your formula.

Regards,

Pascal

See Solution in Thread

2 Replies 2

Hello Björn,

I think that's because the result of your formula is of type text and not date. I would suggest to use this field for display purposes only and to sort on the field "date" called in your formula.

Regards,

Pascal

0800-grizzly
7 - App Architect
7 - App Architect

Hi @Pascal_Gallais- ,

Thank you. Indeed, when I checked this up with Airtable documentation, it confirms the output from a DATETIME_FORMAT is not a date, but a string. I should of course have checked this myself before asking, so apologies. I just couldn't imagine that a function for formatting dates beyond the very limited options built in the field itself would not result in a string. I'd call this a bug :).

Rgds,

Björn