Nov 11, 2005 #1 jw2000 Programmer Aug 12, 2005 105 US I have a datetime field, LastUpdate and I would like to return records with LastUpdate datetime within the last 24 hours. How can I do this? Pseudocode: Where LastUpdate is >= 24 hours ago ...
I have a datetime field, LastUpdate and I would like to return records with LastUpdate datetime within the last 24 hours. How can I do this? Pseudocode: Where LastUpdate is >= 24 hours ago ...
Nov 11, 2005 #2 jbenson001 Programmer Jan 7, 2004 8,172 US You can try: Code: select <columns> from <table> where datediff(hh, <col>, getdate()) <= 24 Upvote 0 Downvote