-1

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
} 
edinvnode
  • 3,497
  • 7
  • 30
  • 53

1 Answers1

1

Look this

Date.parse('01/01/2011 10:20:45') > Date.parse('01/01/2011 5:10:10')
Community
  • 1
  • 1
Marcus Abrahão
  • 696
  • 1
  • 8
  • 18