Skip site navigation (1) Skip section navigation (2)

strptime string for timestamp with time zone

From: Paul Makepeace <postgresql(dot)org(at)paulm(dot)com>
To: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: strptime string for timestamp with time zone
Date: 2003-12-26 03:52:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi, I'm trying to create a time format string for strptime (GNU,
FWIW) that will parse an unmodifed timestamptz string. No luck with
Google yet.

In other words how to parse, e.g. "2003-12-26 03:15:36.633421+00".
"%Y-%m-%d %T" gets as far as the floating point section of the seconds
and bails.

(How does +\d\d represent half-hour timezones? If it was the usual
+\d{4} strptime's %z could at least use it.)

Or, perhaps some way of having PG return it in a strptime-friendly way?

Thanks, Paul

Paul Makepeace ................................

"What is chutzpah? Look inside yourself."


pgsql-novice by date

Next:From: Harry BroomhallDate: 2003-12-26 10:46:30
Subject: Re: strptime string for timestamp with time zone
Previous:From: Thiemo KellnerDate: 2003-12-25 09:32:34
Subject: Is it possible to execute PL/pgSQL not function wrapped?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group