I am pretty sure I sure use case, but not 100% if it will be the best way. Here's what I got, I have a blog site, I want to create a query that shows the 10 most recent blogs, But I want to change the value in the date column to show if it posted "Today" or "yesterday" or "2 Days" or "+3 Days Ago". So here is what I got so far, not really sure how to continue. I have to DATEADD because the server my site is hosted on is 3 hours behind me.
Code:
Select blog_id, blog_title, Recent = Case When DateDiff(Hour, blog_date , DATEADD(hh,+3,GetDate())) < 24 Then 'Today'
ELSE 'Unknown'
END,
From blog_blog