pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: MichaelHoeller@t-online.de
Cc: pgsql-sql@postgresql.org
Subject: Re: date calculation
Date: Fri, 22 Aug 2003 08:42:13 +0200
Message-ID: <3F45BB45.80704@klaster.net> (raw)
In-Reply-To: <1061533501.3f45b73d6566d@webmail.t-online.de>
References: <1061533501.3f45b73d6566d@webmail.t-online.de>

> Hi there,
> 
> I have a problem calculating a date. A field carries the date as passed
> seconds since Jan 1st 1970.
> How can I get the date as dd.mm.yyyy out of this??

cast('1970-1-1' as timestamp)+cast(your_ticks || ' seconds' as interval)

Does anyone know better way to cast it?

Regards,
Tomasz Myrta




view thread (3+ messages)  latest in thread

Message-ID: <3F45BB45.80704@klaster.net>
Permalink:  ../3F45BB45.80704@klaster.net/
Also on:    postgresql.org/message-id/3F45BB45.80704@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, MichaelHoeller@t-online.de
  Subject: Re: date calculation
  In-Reply-To: <3F45BB45.80704@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox