pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How do I do a dynamic - select now() + interval X days ?
4+ messages / 4 participants
[nested] [flat]

* How do I do a dynamic - select now() + interval X days ?
@ 2007-08-08 14:54 Abraham, Danny <danny_abraham@bmc.com>
  2007-08-08 15:16 ` Re: How do I do a dynamic - select now() + interval X days ? Jon Sime <jsime@mediamatters.org>
  2007-08-08 15:19 ` Re: How do I do a dynamic - select now() + interval X days ? Rodrigo De León <rdeleonp@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Abraham, Danny @ 2007-08-08 14:54 UTC (permalink / raw)
  To: pgsql-admin

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.com




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How do I do a dynamic - select now() + interval X days ?
  2007-08-08 14:54 How do I do a dynamic - select now() + interval X days ? Abraham, Danny <danny_abraham@bmc.com>
@ 2007-08-08 15:16 ` Jon Sime <jsime@mediamatters.org>
  2007-08-08 15:24   ` Re: How do I do a dynamic - select now() + interval X days ? Kristo Kaiv <kristo.kaiv@skype.net>
  1 sibling, 1 reply; 4+ messages in thread

From: Jon Sime @ 2007-08-08 15:16 UTC (permalink / raw)
  To: Abraham, Danny <danny_abraham@bmc.com>; +Cc: pgsql-admin

Abraham, Danny wrote:
> Thanks

For doing that based on an arbitrary value, just do the following:

    select now() + interval '1 day' * X;

-Jon

-- 
Senior Systems Developer
Media Matters for America
http://mediamatters.org/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How do I do a dynamic - select now() + interval X days ?
  2007-08-08 14:54 How do I do a dynamic - select now() + interval X days ? Abraham, Danny <danny_abraham@bmc.com>
  2007-08-08 15:16 ` Re: How do I do a dynamic - select now() + interval X days ? Jon Sime <jsime@mediamatters.org>
@ 2007-08-08 15:24   ` Kristo Kaiv <kristo.kaiv@skype.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Kristo Kaiv @ 2007-08-08 15:24 UTC (permalink / raw)
  To: Jon Sime <jsime@mediamatters.org>; +Cc: Abraham, Danny <danny_abraham@bmc.com>; pgsql-admin


On 08.08.2007, at 18:16, Jon Sime wrote:

> Abraham, Danny wrote:
>> Thanks
>
> For doing that based on an arbitrary value, just do the following:
>
>     select now() + interval '1 day' * X;
>
> -Jon
>
test=# select (3||' day')::interval;
interval
----------
3 days
(1 row)

> --  
> Senior Systems Developer
> Media Matters for America
> http://mediamatters.org/
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

Kristo Kaiv
http://kaiv.wordpress.com (PostgreSQL blog)

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: How do I do a dynamic - select now() + interval X days ?
  2007-08-08 14:54 How do I do a dynamic - select now() + interval X days ? Abraham, Danny <danny_abraham@bmc.com>
@ 2007-08-08 15:19 ` Rodrigo De León <rdeleonp@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Rodrigo De León @ 2007-08-08 15:19 UTC (permalink / raw)
  To: pgsql-admin

On Aug 8, 9:54 am, danny_abra...@bmc.com ("Abraham, Danny") wrote:
> Thanks

Please be more specific...




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-08-08 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08 14:54 How do I do a dynamic - select now() + interval X days ? Abraham, Danny <danny_abraham@bmc.com>
2007-08-08 15:16 ` Jon Sime <jsime@mediamatters.org>
2007-08-08 15:24   ` Kristo Kaiv <kristo.kaiv@skype.net>
2007-08-08 15:19 ` Rodrigo De León <rdeleonp@gmail.com>

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