Re: PG sql string -> time_t

From: "Andrew Snow" <andrew(at)modulus(dot)org>
To: "'Bo Lorentsen'" <bl(at)netgroup(dot)dk>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG sql string -> time_t
Date: 2001-12-18 14:03:13
Message-ID: 000001c187cc$c9d4f720$0b00000a@avon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Perhaps this will help? Extract(epoch ..) eg:

SELECT EXTRACT(EPOCH FROM date_field) FROM record;

returns the time in seconds since the epoch like time() in C

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Bo Lorentsen
> Sent: Wednesday, 19 December 2001 12:36 AM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] PG sql string -> time_t
>
>
> Hi ...
>
> Have anyone implimetet a C/C++ "PG SQL date string" to time_t
> converter, that will be easy to copy, or is this a "do it
> your self" task :-)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bo Lorentsen 2001-12-18 14:13:35 Re: PG sql string -> time_t
Previous Message Bo Lorentsen 2001-12-18 13:36:00 PG sql string -> time_t