MS SQL: Date Format
Posted on May 17, 2024 (Last modified on October 6, 2024) • 1 min read • 37 wordsMicrosoft SQL Server date Format
CONVERT(varchar, GETDATE(), 112)
CONVERT(varchar, GETDATE(), 112) + CONVERT(varchar, GETDATE(), 108)
or
CONVERT(varchar, GETDATE(), 112) + CONVERT(VARCHAR, DATEPART(hh, GetDate())) + CONVERT(VARCHAR, DATEPART(mi, GetDate()))
More information about DateTime on Microsoft Learn