Cast timestamp string in metadata as datetime not working

Hello,
I have several timestamp string fields in one of my table.
image

The value is in this format yyyymmddhhmmss

i need to use DatetimeDiff between 2 of this date to calculate a delay.

As is, DatetimeDiff in a custome field give me an error : invalid expression

So i change the type of the field in the metadata to creation timestamp, and specify a format YYYY-MM-DD HH:MM:SS

In the table, i don't see any transformation of the value
image

And i still can't use Datetimediff
image

So after some research, i discovered that i need to cast a timestand string into some metabase datetime format.
I try the timestamp cast first

When i try to access my question, an error link to the cast is shown
ERROR: function to_timestamp(timestamp with time zone, unknown) does not exist

I try with datetime cast instead
image

And now i got this error : ERROR: date/time field value out of range: "20211108164600"

I'm quite lost, i try everything i found on the doc, forum or internet.

Some help would be really welcome.
Best regards

Can't you create a view on your database which performs this conversation already? Then you can use them as normal Date and Datetimes

1 Like

i certainly could, and maybe i will do that eventually.
But i'm trying to found what i can do in metabase.
Plus in this case, i have already quite a few questions and charts using this model base on this table.
with a view a would need to redo some questions and charts.

Finally, i working with a demo DB extract from a real product staging DB. I can do what i want with it, but in production, i will not be able to access the DB to create stuff like view easily .

Anyway it's part of my qualification process of this software, if it's not possible or it's not working, it's ok but it will be part of the limitation of metabase listed in my studie.