RE: php date function

Author: Virgil Bierschwale

Posted: 2013-09-29 at 12:06:52

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:profox-bounces@leafe.com] 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: 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/01fc01cebd36$4c040aa0$e40c1fe0$@gmail.com

** 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.

©2013 Virgil Bierschwale