Hi, this macro have problems.
I want to work with 30 days months and I used the sc_date_dif_2 macro and works well some months ago. but not now.
Try this code in a blank app:
$diasc2 = array();
$diasc2 = sc_date_dif_2(‘2017-01-01’, “yyyy-mm-dd”, ‘2017-12-30’, “yyyy-mm-dd”,2);
$diasce = $diasc2[0];
$mesesc = $diasc2[1];
$anosc = $diasc2[2];
$diasc2 = (($anosc * 360) + ($mesesc * 30) + $diasce);
echo($diasc2);
I expected to get 1 year 0 months 0 days and the result is 11 months and 29 days
Echo-> 359
If you change the number 2 at the end of the macro, the result is the same.
Please help me to check this code.
Regards,
Guido Angulo