Back
Use this below code:
SELECT CONVERT(Datetime, '2020-09-28 18:01:00', 120) -- to convert it to DatetimeSELECT CONVERT( VARCHAR(30), @date ,105) -- italian format [28-09-2020 18:01:00]+ ' ' + SELECT CONVERT( VARCHAR(30), @date ,108 ) -- full date [with time/minutes/sec]
SELECT CONVERT(Datetime, '2020-09-28 18:01:00', 120) -- to convert it to Datetime
SELECT CONVERT( VARCHAR(30), @date ,105) -- italian format [28-09-2020 18:01:00]+ ' ' + SELECT CONVERT( VARCHAR(30), @date ,108 ) -- full date [with time/minutes/sec]
Want to learn more concepts related to SQL? Join this SQL server certification course by Intellipaat.
31k questions
32.8k answers
501 comments
693 users