Posted: Wed May 09, 2007 1:57 pm Post subject: Re: Date difference and date compare
1) Use ordinary relational operators, e.g.
Dim dDate1 As Date, dDate2 As Date
dDate1 = #3/25/2007#
dDate2 = #12/25/2007#
Debug.Print (Date >= dDate1 And Date <= dDate2)
2) Use DateDiff function, as Mike said
If things are not working for you, maybe you could show us some example code
Tony Proctor
"EMILYTAN via VBMonster.com" wrote in message@uwe...
> 1. May i know of the way to compare the dates between 2 dates?
> 2. I want to find the difference by day between 2 dates...
>
>
> thank you
>
> --
> Message posted via VBMonster.com
> http://www.vbmonster.com/Uwe/Forums.aspx/vb-syntax/200705/1
>
Posted: Thu May 10, 2007 4:54 am Post subject: Re: Date difference and date compare
I will try on it first...
Thank you
Tony Proctor wrote:
>1) Use ordinary relational operators, e.g.
>
> Dim dDate1 As Date, dDate2 As Date
> dDate1 = #3/25/2007#
> dDate2 = #12/25/2007#
> Debug.Print (Date >= dDate1 And Date <= dDate2)
>
>2) Use DateDiff function, as Mike said
>
>If things are not working for you, maybe you could show us some example code
>
> Tony Proctor
>
>> 1. May i know of the way to compare the dates between 2 dates?
>> 2. I want to find the difference by day between 2 dates...
>>
>> thank you
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum