Converting e.g. "2022-04-08 09:44:37 +0200" to date

Hey there!

I imported some data to seatable -worked great so far. I want to group the data by month therefor I tried to change the format of my column to date. That was not possible due that fact that the column contains β€œ2022-04-08 09:44:37 +0200”. I tried to create a new column and trim the unnessesary informaiton with : left({Paid at},10) - this shows only the date, but the format is still a string - any idea on how I can get this to work ?

Usually, the β€œre-detect” should do the trick:

But you are right, it does not.

@daniel.pan Could you check this?

Hey !

I tried this already. I seems to keep the string format.
The group function works, but there is no option to group by month. Have a look here:
2022-04-11 um 09-27-17

Because the calculation result type of the left function is always string, it will not be used as a date.

Maybe you can try this formula to meet your needs: date(year(Imported), month(Imported), day(Imported)).

1 Like

Hey ayy!

thanks for reaching out! Your solution seems to work fine !

I got another import column (DATUM) that cointains following string: β€œ01.04.2022 17:31”.
The solution date(year(left({DATUM},10)), month(left({DATUM},10)), day(left({DATUM},10))) does not work here, due the fact that the date is not ISO coded - i guess it needs to be β€œ2022-04-01” to work. any ideas on this to? @ayy

The β€œmid(string, start, length)” function might be a good choice.
e.g. mid(β€œ01.04.2022 17:31”, 7, 4) to get the year, then similarly get the month and day.
Finally, use the β€œdate(year, month, day)” function to generate the date you want.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.