Re: Unix time stamp function?

From: jdassen(at)cistron(dot)nl (J(dot)H(dot)M(dot) Dassen (Ray))
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Unix time stamp function?
Date: 2001-06-13 13:30:21
Message-ID: slrn9ieqnd.psa.jdassen@odin.cistron-office.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Micallef <stevenm(at)ot(dot)com(dot)au> wrote:
> I store Unix time stamps (seconds since Jan 1 1970) in my database. I was
> hoping there was an SQL/PostgreSQL function for converting a unix time
> stamp into a readable date/time string?

You can use something like
to_char(timestamp(foo), 'DD-MM-YYYY HH24:MI:SS')

HTH,
Ray
--
USDoJ/Judge Jackson: "Microsoft has performed an illegal operation and will
be shut down."
James Turinsky in alt.sysadmin.recovery

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-13 13:42:21 Re: Re: very big problem with NULL
Previous Message Bruno Wolff III 2001-06-13 13:25:35 Re: Re: very big problem with NULL