Re: Datetime as a time_t?

From: Michael Fork <mfork(at)toledolink(dot)com>
To: Ryan Bradetich <ryan_bradetich(at)hp(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: Datetime as a time_t?
Date: 2000-04-06 19:46:50
Message-ID: Pine.BSI.4.21.0004061546050.26917-100000@glass.toledolink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have done the following to return a datetime field in unix form:

select datepart('epoch', datetime) from table;

Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio

On Thu, 6 Apr 2000, Ryan Bradetich wrote:

> Hello,
>
> Does anyone know how to extract a datetime field as a time_t?
> My understanding is that PostgreSQL stores dates internally
> as a time_t, but I have not figured out how to extract them in
> that format.
>
> I have looked at the casting, and the set datestyles so far.
> Any ideas?
>
> Thanks,
>
> -Ryan
>
> P.S. I am using PostgreSQL 6.5.3
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message tjk@tksoft.com 2000-04-06 20:18:40 Re: update only if single row
Previous Message Frank Bax 2000-04-06 17:22:16 update only if single row