I was working with a method and it was not giving me proper output then I came to know, the way I was comparing date and time object was completely wrong. I googled but could not find some relevant solution. I want to compare a date and time object with another object.
for example:
if (dtcur >= dtstart && dtcur <= myDT) // 2014-03-24 11:30:00 >= 2014-03-24 11:00:00 & 2014-03-24 11:30:00 <= 2014-03-25 11:00:00
{
// should come here in if condition
}
but it goes in else. It means my comparison is wrong, can anyone help me about how to compare two date and time objects. Thanks in advance