Re: extract or date_part on an interval? How many e - Mailing list pgsql-sql

From Bryce Nesbitt
Subject Re: extract or date_part on an interval? How many e
Date
Msg-id 479D5F54.3040107@obviously.com
Whole thread Raw
In response to Re: extract or date_part on an interval? How many e  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: extract or date_part on an interval? How many e  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-sql
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). 
Thisat 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>

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: extract or date_part on an interval? How many e
Next
From: Michael Glaesemann
Date:
Subject: Re: extract or date_part on an interval? How many e