I have d1 and d2 set in hour:minute:seconds format... How can I compare two time variables and if first is greater execute the function.
In short.
if(d1>d2)
{
//run function
}
I have d1 and d2 set in hour:minute:seconds format... How can I compare two time variables and if first is greater execute the function.
In short.
if(d1>d2)
{
//run function
}
Look this
Date.parse('01/01/2011 10:20:45') > Date.parse('01/01/2011 5:10:10')