checking between dates

1. Junior Member
Join Date
Dec 1969
Posts
4

## checking between dates

i want to check the date and time between two dates, like i want to check date/time is monday 6 am to friday 5 pm

2. Senior Member
Join Date
Dec 1969
Posts
5,955

## Just do a normal compare...

...like you would with integers:<BR><BR>If MyVariable &#062; 12345 And MyVariable &#060; 67890 Then<BR>...<BR>End If<BR><BR>Oliver.

3. Junior Member
Join Date
Dec 1969
Posts
4

## RE: Just do a normal compare...

it is both date and time...between monday 6 am to friday 5 pm

4. Senior Member
Join Date
Dec 1969
Posts
5,955

## Yes, that's what I'm meant. ...

...You have a Date/Time value and can compare it just as normal with another Date/Time value.<BR><BR>Dim dtNow, dtOther<BR><BR>dtNow = Now()<BR>dtOther = DateSerial(2004, 5, 20)<BR><BR>If dtNow &#062; dtOther Then<BR>...<BR>End If<BR><BR>Oliver.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•