Date & Time Problem

  • Thread starter Mary/Phil Stewart
  • Start date
M

Mary/Phil Stewart

I have a small Access 2k application that lists a number of terminals that
are contacted daily. The time & date field is formatted as: mm/dd/yyyy
hh:mm:ss. Presently, I have a query that lists the terminals not contacted.
I am using a criteria entry of <date(). The query shows those units last
contacted yesterday. I would like to list the terminals not contacted within
the last 24 hours.
Can someone help? Thank you.
Phil Stewart
 
K

Ken Snell

Use a calculated field:
DateSince: DateDiff("h", [DateFieldName], Date())

Then use a criterion of ">24" for this calculated field.
 
D

Douglas J. Steele

You probably want to use Now() instead of Date().

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Ken Snell said:
Use a calculated field:
DateSince: DateDiff("h", [DateFieldName], Date())

Then use a criterion of ">24" for this calculated field.

--
Ken Snell
<MS ACCESS MVP>

Mary/Phil Stewart said:
I have a small Access 2k application that lists a number of terminals that
are contacted daily. The time & date field is formatted as: mm/dd/yyyy
hh:mm:ss. Presently, I have a query that lists the terminals not contacted.
I am using a criteria entry of <date(). The query shows those units last
contacted yesterday. I would like to list the terminals not contacted within
the last 24 hours.
Can someone help? Thank you.
Phil Stewart
 

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

Top