I have a table of users and a table consisting of logins which I'm joining together. I'm trying to query the users who have logged in within the past 20 minutes. I've been attempting to use the datediff function such as:
DateDiff("M", MyDateTime1, MyDateTime2)
but I'm unclear about a couple of things.
One, does the dateDiff function account for different years and hours, meaning does the datediff function drop year and days and only looks at the minutes?
For example, say I have an entry at:
08/01/2007 10:10:10 and
08/01/2008 10:20:10
and assume the datetime now is 08/01/2008 10:22:10. Would the results returned be 2 or 1?
Is there a better function to use? If so, what is it and I'll research it.
Thank,
Red