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.br; ? Tom At

RE: [PHP] Augmenting an old date

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

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 ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime(+30 days,strtotime($start))); echo $expire.br; ? Tom At 02:03 PM 19/05/2002,

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi A slightly more efficeint way :) ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime($start +30 days)); echo $expire.br; ? 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

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