SQL Format Time


I have a datetime field in SQL that I need to convert to

HH:MM AM/PM

Concatenation is fine.

How?
LVL 1
cheryl9063Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
sorry:

select right( convert(varchar(30), yourfield, 0), 7)
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you could check out this:
select right( convert(varchar(30), yourfield, 0), 10)
0
 
cheryl9063Author Commented:
When I put getdate() in place of yourfield.. I get the below..


11  4:15PM
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.