PDA

View Full Version : Solved: Deadline Query



kbsudhir
06-29-2009, 07:17 AM
Hi All,

I have a field in my access that captures the deadlin in below format :
"6/28/2009 2:32:58 PM"

I want to know how create a query where I want to get the data where deadline is <= 4Hrs from the current time.

Please guide.

:help :help

Regards
Sudhir

OBP
06-29-2009, 07:50 AM
kbsudhir, first of all split your date/Time field in to 2 new Columns with Date & Time based on your Deadline field.

kbsudhir
06-29-2009, 08:18 AM
SELECT Assigned.Subject, Assigned.AssignedTo, Assigned.ReceivedDateTime, Assigned.SLADeadLine, Assigned.ChangedSLADeadLine, Assigned.SLAChangeReason
FROM Assigned
WHERE (((Int([SLADeadLine]))=Date()) AND ((Assigned.SLADeadLine)<=Now()+#4:00:00#)) OR (((Int([ChangedSLADeadLine]))=Date()) AND ((Assigned.ChangedSLADeadLine)<=Now()+#4:00:00#));


Thanks OBP, but I am able to do it using the above query.

Thanks for the guidance

Regards
Sudhir