how to compare two date variables?

  • Thread starter Thread starter Amanda
  • Start date Start date
A

Amanda

I have ArrivalDate and DepartureDate.

I need to compare them to see whether arraival date is before departure
date ( Note, in this program, we are not concern about arrival date
that is before today's date).

Help?
 
The greater than operator works just fine:

if date1 > date2 Then ...

Note that you can also use =, <>, >=, <= operators. Check out MSDN.
 
Truong said:
The greater than operator works just fine:

Thanks a lot; I wasn't sure about that. I was thinking there night be
compare function of soem sort.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top