To convert a string to date I need to omit meaningless parts. I found
this format working well (Twitter dump format):
SELECT to_timestamp(
'Tue Sep 24 08:56:18 +0000 2013',
'xxx Mon DD HH24:MI:SS xxxxx YYYY'
)
-- 2013-09-24 08:56:18-07
In place of "xxx" I can use any non-reserved symbols, e.g.:
'aaa Mon DD HH24:MI:SS bbbbb YYYY'
Number of symbols can vary in some limits, e.g. 'aa' is still working.
Is it hack or normal behaviour of parser? I did not find any mention of
wildcards or placeholders in documentation:
http://www.postgresql.org/docs/9.5/static/functions-formatting.html
Best regards,
Mavka
P.S. I use PostgreSQL 9.4.