comparing dates

P

Paul

Hi all,

I'm building a sort of calendersystem with the ability for
users to make reservations for meetingrooms. All
reservations are stored in an Access database. Now I would
like to show all reservations in a graphical way. I made
12 labels (7.00 am till 7.00 pm), and if a certain time is
booked it should be red.
Right now I try to compare each label with a database
entry like this:

strStart = dbRead("Start") 'type date
timetocompare = #2:00:00 PM# 'type date

If strStart > timetocompare Then
label red...
Else
label green..
end if

The problem is that strstart is always greater then
timetocompare (no matter what). Strstart=#12/30/1899
9.00:30 AM# and timetocompare=#2.00:00 pm#

Can anyone tell me how I can compare these time values? Do
I have to work with AM/PM?

Thanks in advance,
Paul
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top