Postgres char(14) fields stores datetime withou separators like 20131124112907
How to add separators so that result is string in format
2013-11-24 11:29:07
I tried Denis answer using
to_timestamp(timestamp, 'YYYYMMDDHHMISS')::text as updated_at
but got exception
Message=ERROR: 22007: hour "15" is invalid for the 12-hour clock
Code=22007
File=src\backend\utils\adt\formatting.c
Hint=Use the 24-hour clock, or give an hour between 1 and 12.