Link to home
Start Free TrialLog in
Avatar of cheryl9063
cheryl9063Flag for United States of America

asked on

SQL Format Time


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

HH:MM AM/PM

Concatenation is fine.

How?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

you could check out this:
select right( convert(varchar(30), yourfield, 0), 10)
Avatar of cheryl9063

ASKER

When I put getdate() in place of yourfield.. I get the below..


11  4:15PM
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial