Format Time From HHMM to HH:MM using Stuff function.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 182
Write below query:-
DECLARE @Time VARCHAR(10);
SET @Time = '1145'

SELECT STUFF(@Time,3,0,':') AS [HH:MM]


Output
11:45

Comments or Responses

Login to post response