How to get records based on timestamp
555097Aug 20 2008 — edited Aug 20 2008Hi All,
I have a table with three columns StudentId, Status, Time_Stamp
Here's the sample data.
StudentId Status Time_Stamp
------------------------------------------------
100 1 8/18/2008 4:58:28.000000 PM -05:00
101 2 8/18/2008 4:50:28.000000 PM -05:00
102 1 8/18/2008 4:52:28.000000 PM -05:00
103 3 8/18/2008 5:58:28.000000 PM -05:00
104 1 8/18/2008 4:51:28.000000 PM -05:00
My question is I want to get all the records where Status=1 and last update to their
Status occured more than X minutes ago. Where X could be any number of minutes.
For example I want to get all records for 5 minutes.
please help me to slove this problem.
any help is highly appreciated.