Thanks Tom, for the excellent help!
Seems like 'strtotime' function was what was needed!
Regards,
Andre
On Sunday 19 May 2002 01:06 am, you wrote:
> Hi
> A slightly more efficeint way :)
>
> $start = "2002-01-01";
> $expire = date("Y-m-d",strtotime("$start +30 days"));
> echo $expire."";
> ?>
Wow this is a pretty cool function. I was playing
with it and you can add like +30 days + 99 seconds
together and it works.
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: May 19, 2002 1:07 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] Augmenting an
Hi
A slightly more efficeint way :)
";
?>
Tom
At 02:03 PM 19/05/2002, Andre Dubuc wrote:
>Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'):
>'start_date' and 'expiry_date'. What I cannot seem to figure out is how to
>augment the 'expiry_date' either by 30 days, 60 days,
Hi
You need to use the strtodate function which converts to a time stamp a
date string and you can offset it by a number of days or whatever
something like this
";
?>
Tom
At 02:03 PM 19/05/2002, Andre Dubuc wrote:
>Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'):
>'st
Here's a nice article all about dates
http://www.phpbuilder.com/columns/akent2610.ph
p3
On page 6 of that article it shows a function for
adding years, months, days ... to a date.
function DateAdd ($interval, $number, $date)
{
$date_time_array = getdate($date);
$hours = $date_time_array[
5 matches
Mail list logo