Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

convert varchar to time sql

-- convert 24 hr text to AM/PM text time
CONVERT(VARCHAR(15),FORMAT(CAST('16:00' as datetime), 'hh:mm tt'))
-- returns 04:00 PM
Source by www.sqlshack.com #
 
PREVIOUS NEXT
Tagged: #convert #varchar #time #sql
ADD COMMENT
Topic
Name
4+2 =