Maybe check the examples at date() and time() functions at php.net?
Maybe example of your problem would help also.
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
The strtotime function is useful for this sort of thing. Here is a little routine that calculates the 2nd and 4th Saturdays in May (as an example):
<?PHP
$wk = strtotime ("first saturday may 2009");
if ($wk == false) {
echo "Not able to interpret the string ";
exit;
}
$sat2 = $wk + (3600*24*7); // add seven days (in seconds)
$sat4 = $sat2 + (3600*24*14); // add 14 days
$wk2 = date ("Y-m-d",$sat4);
echo $wk2;
?>
chrishea
Nearly a Posting Virtuoso
1,427 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
Show us your code if there are problems with it.
Quick look the previous code should work.
Like i said should work using the date() and time() functions depending on what your requirements are?
OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10