You're probably trying to do it in too few steps..

$firstdate = date_date_set($date,2013,08,27);
$seconddate = date_date_set($date,2013,09,02);


-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Gary Jeurink
Sent: Sunday, September 29, 2013 12:02 PM
To: 'ProFox Email List'
Subject: RE: php date function


I think I'm close but I'm getting flagged when I create my switch variables.

   $curDate = Date('Y/m/d');
   $firstDate = DateTime::createFromFormat('Y/m/d', '2013/08/27');
   $secondDate = DateTime::createFromFormat('Y/m/d', '2013/09/02');
   if ($curDate >= $firstDate && $curDate <= $secondDate)
   {
      $curWeek = '01';
      return $curWeek;
   } // end of if week 1

The curDate goes through alright but the firstDate AND secondDate part won't
fly. I'm not sure if it's a version problem or the fact that I'm ignoring
the time portion.

Gary Jeurink




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to