Link to home
Start Free TrialLog in
Avatar of wsturdev
wsturdevFlag for United States of America

asked on

Format Date and Time as yyyy-mm-dd hhmm

I am writing a SPROC.  What is the syntax for converting the result of GetDate() into the format yyyy-mm-dd hhmm?

DECLARE @MyDateTime varchar(20)
@MyDateTime = GetDate()
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