Re: Date Manipulations - Mailing list pgsql-php

From Mitch Vincent
Subject Re: Date Manipulations
Date
Msg-id 000d01c10a28$13ac67c0$1a0d040a@Mitch
Whole thread Raw
In response to Date Manipulations  ("Chris Ruprecht" <chrup999@yahoo.com>)
List pgsql-php
Well, it depends on what you're trying to do :-)

You can add days an arbitrary date in a number of ways , I often let PG
handle it though (as you are)..

I generally do something like

SELECT ('05-05-2001'::date + '5 days'::interval)

Or something like that if I need X days ahead or behind date Y...

----- Original Message -----
From: "Chris Ruprecht" <chrup999@yahoo.com>
To: "p-php" <pgsql-php@postgresql.org>
Sent: Wednesday, July 11, 2001 10:06 AM
Subject: [PHP] Date Manipulations


> Hi all,
>
> Currently, when working with dates, I use constructs like
>
> ('$NewDate'::date + 5)::date
>
> this seems a little clumsy to me and I was wondering if there was an
easier
> way of doing this.
>
> Best regards,
> Chris
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


pgsql-php by date:

Previous
From: "Chris Ruprecht"
Date:
Subject: Date Manipulations
Next
From: "Chris Ruprecht"
Date:
Subject: Re: Date Manipulations