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

From: Ryan Kelly <rpkelly22(at)gmail(dot)com>
To: Christian(dot)Strobl(at)dlr(dot)de
Cc: psycopg(at)postgresql(dot)org
Subject: Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Date: 2013-08-01 12:11:19
Message-ID: 20130801121119.GA10036@llserver.lakeliving.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Thu, Aug 08/01/13, 2013 at 09:24:11AM +0000, Christian(dot)Strobl(at)dlr(dot)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

In response to

Browse psycopg by date

  From Date Subject
Next Message Christian.Strobl 2013-08-01 13:25:53 Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Previous Message Karsten Hilbert 2013-08-01 11:11:15 Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]