Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to convert a "char(4)" datatype to "time" datatype

$
0
0

I have a "char(4)" column whose values I need to change to a "time" datatype in 12 hour format.  For example, I have "1600" and I need to change that to "4:00pm".  I don't need to update the values in the database, only in a report.  Can I do this is t-sql?  I'm using SQL Server 2008 R2.

Thanks,

Jeff


Jeff Bandy


Viewing all articles
Browse latest Browse all 23857

Trending Articles