From: Bryce Nesbitt <bryce1@obviously.com>
To: pgsql-sql@postgresql.org
Subject: Re: extract or date_part on an interval? How many e
Date: Sun, 27 Jan 2008 20:51:32 -0800
Message-ID: <479D5F54.3040107@obviously.com> (raw)
In-Reply-To: <16843.1201489840@sss.pgh.pa.us>
References: <479D3E63.2080601@obviously.com>
<16843.1201489840@sss.pgh.pa.us>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sigh. Ok, I settled on:<br>
<blockquote><tt>select '1987-01-29'::timestamp + interval '21 years'
> now();</tt><br>
</blockquote>
Which is closer to what I wanted anyway (this was all about determining
who was under 21 years old). This at least should be robust over leap
years.<br>
<br>
<br>
Tom Lane wrote:<br>
<blockquote cite="mid:16843.1201489840@sss.pgh.pa.us" type="cite">
<pre wrap="">There is nothing simple about datetime calculations, ever :-(
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="100">--
----
Visit <a class="moz-txt-link-freetext" href="http://www.not-so-obviously.com/">http://www.not-so-obviously.com/</a;
</pre>
</body>
</html>
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: bryce1@obviously.com
Subject: Re: extract or date_part on an interval? How many e
In-Reply-To: <479D5F54.3040107@obviously.com>
* 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