Re: date question

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: javier garcia - CEBAS <rn001(at)cebas(dot)csic(dot)es>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: date question
Date: 2003-06-17 18:09:56
Message-ID: Pine.LNX.4.44.0306171934390.2043-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

javier garcia - CEBAS writes:

> Is there a way to create a table from this table, directly in Postgres in
> which a date field is created based in the values of "year", "month", "day"
> in this table?

year * interval '1 year' + month * interval '1 month' + day * interval '1 day'

This results in a timestamp value that you can compare to or assign to a
date value.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

  • date question at 2003-06-13 11:44:09 from javier garcia - CEBAS

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message mallah 2003-06-17 18:17:22 Re: disabling triggers
Previous Message Peter Eisentraut 2003-06-17 18:04:42 Re: [HACKERS] Our FLOAT(p) precision does not conform to spec