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()
LVL 1
wsturdevAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
DECLARE @MyDateTime varchar(20)
SET @MyDateTime = REPLACE(CONVERT(varchar(16), GetDate(), 120), ':', '')
0
All Courses

From novice to tech pro — start learning today.