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 _______________________________________________ Post Messages to: ProFox@leafe.com 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/B7735F72E2344A4C93CA7A2556B6FDF0@OwnerPC ** 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.