This if condition is only supposed to be executed if my aTime is 2 hours more than lastaTime.
Format of aTime and lastaTime is "06:30:00 AM" for example
If (CDate(aTime) + TimeValue("02:00:00")) >= CDate(lastaTime))
{
}
But the code in the if condition is executed even if it is not true. Can someone figure out what is wrong with the code?
Format of aTime and lastaTime is "06:30:00 AM" for example
If (CDate(aTime) + TimeValue("02:00:00")) >= CDate(lastaTime))
{
}
But the code in the if condition is executed even if it is not true. Can someone figure out what is wrong with the code?