Re: [PHP] Augmenting an old date

2002-05-19 Thread Andre Dubuc
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.""; > ?>

RE: [PHP] Augmenting an old date

2002-05-18 Thread SP
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

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
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,

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
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

RE: [PHP] Augmenting an old date

2002-05-18 Thread SP
break; case "h": $hours+=$number; break; case "n": $minutes+=$number; break; case "s": $seconds+=$number; break; } $timestamp = mktime($hours ,$minutes, $seconds,$month ,$day, $year); return $timestamp; } -Original Message- From:

[PHP] Augmenting an old date

2002-05-18 Thread Andre Dubuc
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, or 1 year. I've tried the date function in PHP (getdate) but the problem is that it appears