Postgres timestamp microseconds do not convert properly

One Star

Postgres timestamp microseconds do not convert properly

I have csv files with downloaded data from postgres tables containing timestamps down to microseconds. (Note: output microsecond format is not always 6 places). For test I removed microseconds from last column and that renders OK but I cannot eliminate the microseconds.
DATA>
Lane,Start_Date,Start_Time, End_Time
Lane 06,8/9/2013, 2013-08-07 15:01:32.2219, 2013-08-07 15:01:32
Lane 04,09/09/2013, 2013-09-07 12:01:32.221933, 2013-09-07 16:01:01
with "yyyy-mm-dd hh:mm:ss.SSSSSS" renders invalid date and date form
RUN>
Starting job date_test at 13:38 17/09/2013.
Lane 06|2013-08-09|2013-08-07 15:05:13.Eastern Daylight Time|2013-08-07 15:01:32
Lane 04|2013-09-09|2013-09-07 12:05:13.Eastern Daylight Time|2013-09-07 16:01:01
with "yyyy-mm-dd hh:mm:ss.ZZZZZZ" and variations thereof
RUN>
Unparseable date: "2013-08-07 15:01:32.2219"
Unparseable date: "2013-09-07 12:01:32.221933"
Moderator

Re: Postgres timestamp microseconds do not convert properly

Hi,
Z is just for time zone, what's your expected result for "yyyy-mm-dd hh:mm:ss.ZZZZZZ"?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Postgres timestamp microseconds do not convert properly

Any use of Z, timezone, renders unparseable date