I have a problem, and i'm not sure really how to slove it. I have a table that has a datetime stamp in it, and what i need to do is get that date time stamp and compair it to the current time.
So I have this.
--@time is the datetime stamp in the table.
set @difference = (datediff(hour, Convert(char(50), getdate(),109), @time))
Now then what i need to do is check to see if the difference is greater than one hour, if it is i'm emailing a group of people (which i have working)
but when i do a print out of the difference it get Jan 1 1900 12:00AM
so how can i say @difference > 1 ?
thanks.
--------------

So I have this.
--@time is the datetime stamp in the table.
set @difference = (datediff(hour, Convert(char(50), getdate(),109), @time))
Now then what i need to do is check to see if the difference is greater than one hour, if it is i'm emailing a group of people (which i have working)
but when i do a print out of the difference it get Jan 1 1900 12:00AM
so how can i say @difference > 1 ?
thanks.
--------------