Convert Date and Time to UK (United Kingdom) Date format in SQL Server

makumbi
 
on Jul 13, 2022 11:27 PM
421 Views

Please help how can i convert this date 2020-11-16 12:18:11.243 and it remains its timestamp.

I want to convert it to United Kingdom date format thanks in advance

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jul 14, 2022 12:15 AM

Hi makumbi,

Use FORMAT function.

Check the example.

SQL

DECLARE @startDate DATETIME = '2020-11-16 12:18:11.243'
SELECT FORMAT (@startDate, 'dd/MM/yyyy hh:mm:ss ') 'UK Date'

Output

UK Date

16/11/2020 12:18:11