I have a VB program that needs to count number of events between two datetime values.
Something like this:
SELECT COUNT(*) FROM Report WHERE WeigthTime BETWEEN "Time1" AND "Time2"
Time1 is now. I get it with "SELECT GETDATE()"
I need to calculate Time2 by decrementing it for X hours. X is insertred in VB Form.
Is there some operators for datetime format?
Please help.
Best regards