Home All Groups Group Topic Archive Search About

how to compare two date variables?

Author
10 Oct 2006 11:22 AM
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?

Author
10 Oct 2006 11:49 AM
Truong Hong Thi
The greater than operator works just fine:

if date1 > date2 Then ...

Note that you can also use =, <>, >=, <= operators. Check out MSDN.



Amanda wrote:
Show quoteHide quote
> 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?
Author
10 Oct 2006 7:12 PM
Amanda
Truong Hong Thi wrote:
> 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.


Show quoteHide quote
>
> if date1 > date2 Then ...
>
> Note that you can also use =, <>, >=, <= operators. Check out MSDN.
>
>
>
> Amanda wrote:
> > 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?