I have two dates :
date1 = "2013-07-08 12:30:00"
date2 = "2013-07-08 13:30:00"
Now in javascript i want to match these two dates and its they dont match than i want to delete the appointment and if they match than nothing to do.
I tried this code but its not working :
if(date1 == date2)// Event already exists
{
// do nothing
}
else
{
// delete the record.
}
I tried to compare with "new Date(date1) == new Date(date2)" also but its not working either.
There is some problem in my code or date format. can anyone know how to do this and where i am wrong in this code ?
Thanks in advance.