I have a date string in a postgres db
"2021-08-09 18:40:54.000+0000"
and am converting it to a dimension group with the following
{
type: time
datatype: timestamp
sql: TO_TIMESTAMP(replace(${TABLE}."DateField", 'T', ' '), 'YYYY-MM-DD HH24:MI:SS.0000');;
}
If i change the HH24 to a 12 it kicks me out saying that 18 is out of range, and if i convert with
to_char("CreatedDate"::timestamp, 'YYYY-DD-MM HH12:MI:SS PM')
It defaults back to the 24 hour time format despite putting the HH12 in.
My field is stored in the database as a text field, and is in UTC 24 hour time format.
Is there a way to leverage the looker time dimension_group to set this to a 12 hour time format?