To Get the Date Diffence of the Current_date and FirstNoticeDate

In every scenario, the date functions and calculations are more import and effective way to have it. Here I used to get the correct and notice date as an example. 
  1. I'm just converting the DateTime to the temp value and stored in a variable.
  2. Then I go for the calculation the differences of the dates (i.e). The current date and notice date
*@ TO Get the Date Difference of the Current_date and FirstNoticeDate
*@ Param Current_date, FirstNoticeDate.
*@ Return Due Days

function Days_Different($current_date, $notice_date)
//To Change the Date Format to StringtoTime:
$temp_current_date = strtotime($current_date);
$temp_notice = strtotime($notice_date);

 // Calculate the Date Difference for the Days  
$days_difference = (($temp_current_date - $temp_notice) / (60*60*24));  

return $days_difference;



Popular posts from this blog

Create a Plugin in the in Windows for Processmaker 3.0

Create a Plugin in the in Linux for Processmaker 3.0

Getting Started with Laravel 5.4 with sample CURD