tsql - Get age from record in table: T-SQL -


so each record on table has datetime timestamp column.

how return age (in hours), of these records in database?

thank you!

select datediff(hour,timestamp,getdate()) hours_old mytable 

Comments