Re: Add expiry date after created

2009-07-12 Thread Miles J
$date = date('Y-m-d H:i:s', strtotime('+31 days')); Easier. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this gro

RE: Add expiry date after created

2009-07-12 Thread Dave Maharaj :: WidePixels.com
Cool! $date = date("Y-m-d H:i:s", time() + (31*86400)); had to add H:i:s but it works perfect. Thanks -Original Message- From: idx [mailto:idxma...@gmail.com] Sent: July-12-09 2:32 PM To: CakePHP Subject: Re: Add expiry date after created Maybe try: $date = date(&qu

Re: Add expiry date after created

2009-07-12 Thread idx
Maybe try: $date = date("Y-m-d", time() + (31*86400)); On Jul 12, 12:49 pm, "Dave Maharaj :: WidePixels.com" wrote: > How can I add 31 days to a date created? > > When saving i have > > $date = date("Y-m-d"); > $date = strtotime(date("Y-m-d", strtotime($date)) . " +31 days"); > $this->data['Acc