Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting date desciptions from datetime field

Status
Not open for further replies.

chrissparkle

Programmer
Mar 27, 2006
50
NZ
I would like to output messages from my select statement in my proc based on the value in my datetime field. ideally I'd like to check if the date in the field is less than 30 mins from now then say "X minutes ago", if it's more then i say "Less than 1 hour ago", more than 1 hour i say "X hours" etc etc .

Is this possible from within the select statement?
 
Books On Line, it is the SQL Server Help.

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top