SQLTeam.com | Weblogs | Forums

Displaying DateTime with 24-hour Time


#1

Won't allow post deletion. I hate the new site.


#2

Nah. Something else must be going on. Maybe time zone difference? UTC time vs local time? Something. Format 120 definitely returns 24-hr time.


#3

[code]declare @dt datetime = '2016-02-17 14:01:15'

select @dt, CONVERT(VARCHAR, @dt, 120)[/code]This yields these values:
2016-02-17 14:01:15.000 2016-02-17 14:01:15
Looks like 24-hour clock to me...


#4

Why did you delete your original post?


#5

Your loss then. You could just ask the MODs to delete your post if it contained confidential information / whatever. If there isn't a suitable reason then deleting a post just wrecks the ensuing discussion and, as per the forum rules, results in the original post being reinstated.

I don't know of other forums where you can delete the first post ONCE replies have been posted (as was the case here)


#6

Just curious why you deleted your post.