Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding time

Status
Not open for further replies.

junkie8

Technical User
Aug 9, 2009
32
US
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?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top