Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)] - Mailing list psycopg

From Ryan Kelly
Subject Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Date
Msg-id 20130801121119.GA10036@llserver.lakeliving.com
Whole thread Raw
In response to [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]  (<Christian.Strobl@dlr.de>)
List psycopg
On Thu, Aug 08/01/13, 2013 at 09:24:11AM +0000, Christian.Strobl@dlr.de wrote:
>
> hi all,
>
> i want to create an timestamp with to_timestamp() and i get always an output like this
>
> [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
>

Are you looking to get back a string? Cast to TEXT first:

SELECT CAST(to_timestamp ('130729.0902', 'YYMMDD.HH24MI') AS TEXT);

-Ryan


psycopg by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Next
From: Karsten Hilbert
Date:
Subject: Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]