I have looked through other asked questions but havn't found the issue with my code exactly. I am trying to find the newer of 2 dates, and i have split the DD,MM YY,HH,MM,SS into variables so i can do the following and compare
var bool = false
if (year1 <= year2)
if (month1 <= month2)
if (day1 <= day2)
if (hours1 <= hours2)
if (minutes1 <= minutes2)
if (seconds1 <= seconds2)
bool = true;
return bool;
However, I still run into issue if for example the first date is less in Day month and year and hour, but greater in minutes and seconds
ex: if time 1 is 18/7/2016 15:16:4 and time 2 is 19/7/2016 18:14:59
it would result in a false even though time 2 is newer, it just the seconds thats an issue. can this be fixed by else ?