Hi @Rahul Polaboina

Here is sample SELECT script:

SELECT FORMAT(cast('17:00' as datetime),'hh:mm:tt'); 
SELECT FORMAT(cast('14:00' as datetime),'hh:mm:tt'); 

Answer from Chandu_0124 on learn.microsoft.com
Discussions

Converting varchar time HHMM to 24 hour HH:MM:SS? - SQL Server Forums
Microsoft SQL Server articles, forums and blogs for database administrators (DBA) and developers. More on sqlteam.com
๐ŸŒ sqlteam.com
October 29, 2014
sql server 2012 - Converting varchar(6) in HHmmss format to sql time format - Stack Overflow
How is it possible to convert something stored in DB as varchar(6) (e.g., 180000 which is actually in a format of HHmmss) to time, I tried the following but wont work select convert(time,'180000') More on stackoverflow.com
๐ŸŒ stackoverflow.com
sql - TSQL Convert VARCHAR of HHMMSS to TIME - Stack Overflow
I have a VARCHAR field that has sample values as listed below and I would like to convert it to HH:MM:SS. Suggestions? 151200 085800 080100 210100 083300 More on stackoverflow.com
๐ŸŒ stackoverflow.com
November 5, 2019
How to convert hhmm into datetime 13:30:00 T-SQL? โ€“ SQLServerCentral Forums
How to convert hhmm into datetime 13:30:00 T-SQL? Forum โ€“ Learn more on SQLServerCentral More on sqlservercentral.com
๐ŸŒ sqlservercentral.com
December 2, 2008
๐ŸŒ
SQL Team
sqlteam.com โ€บ forums โ€บ topic.asp
Converting varchar time HHMM to 24 hour HH:MM:SS? - SQL Server Forums
October 29, 2014 - Microsoft SQL Server articles, forums and blogs for database administrators (DBA) and developers.
๐ŸŒ
MSSQLTips
mssqltips.com โ€บ home โ€บ sql date format examples using convert function
SQL Date Format Examples using SQL CONVERT Function
September 26, 2025 - Use SELECT CONVERT and the format option for the date/time format needed ... Check out the table below for all of the different format options for Dates and Times. The date used for all of these examples is โ€œ2022-12-30 00:38:54.840โ€ (December ...
๐ŸŒ
Codelabs365
codelabs365.com โ€บ convert hh:mm:ss string into time type, minutes, or seconds
SQL Server Convert HH:mm:ss String into Time Data Type, the Total Number of Minutes, or the Total Nmber of Seconds. | Codelabs365
DECLARE @timeString VARCHAR(8) = '10:32:59'; declares a variable named @timeString and assigns the value '10:32:59' to it. This variable now holds the input time string in the format HH:mm:ss. DECLARE @time TIME = CONVERT(TIME, @timeString); declares another variable named @time and assigns ...
Find elsewhere
๐ŸŒ
SQLServerCentral
sqlservercentral.com โ€บ forums โ€บ topic โ€บ how-to-convert-hhmm-into-datetime-133000-t-sql
How to convert hhmm into datetime 13:30:00 T-SQL? โ€“ SQLServerCentral Forums
December 2, 2008 - Converting varchar to datetime T-SQL. ... Jeff's answer will work only if you guarantee that you'll have 4 digits regardless of the value. For example if the time should be 9:05 will you varchar show 0905?
๐ŸŒ
CopyProgramming
copyprogramming.com โ€บ howto โ€บ tsql-convert-varchar-of-hhmmss-to-time
Sql: Transforming a VARCHAR in HHMMSS format to TIME in T-SQL
March 31, 2023 - Ask Question Asked 5 years, 6 months ago. If you are using SQL Server 2012 or above and want to store the values as actual TIME data types, you can use the TIMEFROMPARTS function. For example: DECLARE @d VARCHAR(10) SET @d = '151200' SELECT โ€ฆ ... Style 121 can be utilized, however, the format ...
๐ŸŒ
Google Sites
sites.google.com โ€บ site โ€บ mssqlserverworkstation โ€บ follow-me โ€บ blog โ€บ howtoconvertfromstringtodatetime
How to convert from string to datetime? - SqlServer Work Station
December 9, 2012 - Execute the following T-SQL scripts in Microsoft SQL Server Management Studio (SSMS) Query Editor to demonstrate T-SQL CONVERT and CAST functions in transforming string SQL date formats, string time & string datetime data to datetime data type. Practical examples for T-SQL DATE / DATETIME functions
๐ŸŒ
W3Schools
w3schools.com โ€บ sql โ€บ func_sqlserver_convert.asp
SQL Server CONVERT() Function
String Functions: Asc Chr Concat with & CurDir Format InStr InstrRev LCase Left Len LTrim Mid Replace Right RTrim Space Split Str StrComp StrConv StrReverse Trim UCase Numeric Functions: Abs Atn Avg Cos Count Exp Fix Format Int Max Min Randomize Rnd Round Sgn Sqr Sum Val Date Functions: Date DateAdd DateDiff DatePart DateSerial DateValue Day Format Hour Minute Month MonthName Now Second Time TimeSerial TimeValue Weekday WeekdayName Year Other Functions: CurrentUser Environ IsDate IsNull IsNumeric SQL Quick Ref
๐ŸŒ
SQLTeam
forums.sqlteam.com โ€บ t โ€บ timeformat-hhmmss โ€บ 23669
Timeformat: hhmmss - SQLTeam.com Forums
November 14, 2023 - Hi I need to have the time format in hhmmss SELECT CONVERT(VARCHAR(8),GETDATE(),108) 15:31:42 I need it to be 153142 is there the way to do it? Thanks
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ sql โ€บ t-sql โ€บ functions โ€บ cast-and-convert-transact-sql
CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn
When you convert between datetimeoffset and the character types char, nchar, nvarchar, and varchar, the converted time zone offset part should always have double digits for both HH and MM.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ answers โ€บ questions โ€บ 112599 โ€บ sql-server-2008-conversion-from-string-to-time
Sql Server 2008 Conversion from string to time - Microsoft Q&A
I am not sure what you meant , but try SELECT CONVERT(TIME,CONVERT(VARCHAR(24), CONVERT(DATETIME, message_date, 103), 114)) Date FROM tblname ... Please I am having similar issue. I actually designed an application GUI, the GUI has a form with different input variables (textfield ). There's also a textfield for date and the date gets inputted automatically. After all the data have been entered in their textfields of the form, I submit the record and they get saved in SQL database.
๐ŸŒ
SQLServerCentral
sqlservercentral.com โ€บ forums โ€บ topic โ€บ get-time-in-hhmm-format
Get time in hh:mm format โ€“ SQLServerCentral Forums
May 7, 2008 - When you move the data over you should put the time in a datetime column, unless you are using SQL 2008. There is no need to use the left function to grab the time, in the format you want. This is an unnecessary step. Simply convert your datetime column to varchar(5).