CONVERT to HH:MM AM/PM
From: Patrick Rouse (anonymous_at_discussions.microsoft.com)
Date: 04/27/04
- Next message: Vishal Parkar: "Re: flip the results"
- Previous message: Eli: "Third party tracing tools"
- Next in thread: Trey Walpole: "Re: CONVERT to HH:MM AM/PM"
- Reply: Trey Walpole: "Re: CONVERT to HH:MM AM/PM"
- Reply: Gregory A. Larsen: "Re: CONVERT to HH:MM AM/PM"
- Reply: Take care of the formatting: "RE: CONVERT to HH:MM AM/PM"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Apr 2004 13:06:07 -0700
I have a table storing the time as varchar(25), but want to display it on a report as HH:MM w/ AM or PM, i.e. 12:05AM or 12:05PM (no date, just the time)
I've tried a bunch of CONVERT statements listed in the BOL and in previous threads, but the best I've gotten is with 108 which gives me HH:MM:SS w/o the AM/PM.
Is there a way to do this with TSQL?
Thanks.
- Next message: Vishal Parkar: "Re: flip the results"
- Previous message: Eli: "Third party tracing tools"
- Next in thread: Trey Walpole: "Re: CONVERT to HH:MM AM/PM"
- Reply: Trey Walpole: "Re: CONVERT to HH:MM AM/PM"
- Reply: Gregory A. Larsen: "Re: CONVERT to HH:MM AM/PM"
- Reply: Take care of the formatting: "RE: CONVERT to HH:MM AM/PM"
- Messages sorted by: [ date ] [ thread ]