Parse and format PostgreSQL dates and times
