Friday 18 July 2014

How to calculate the weeks between two dates

How to calculate the weeks between two dates.

//php code
$today=date('Y-m-d h:i:s');
$fromData="2014-01-01 00:00:00"
$diff = strtotime($today, 0) - strtotime($fromData, 0);
$weekNo = floor($diff / 604800);
$weekNo = $weekNo+1;
echo "This is the ".$weekNo." of the Year 2014";
//end

No comments:

Post a Comment

List OF BANK PAN Numbers

List OF BANK PAN Numbers Bank/Home Loan Providers PAN Number Allahabad Bank AACCA8464F Andhra Bank AABCA7375C Axis Bank...