Converting VARCHAR Type Date to dd.mm.yyyy in SQL Server

Converting VARCHAR Type Date to ddmmyyyy in SQL Server
Converting VARCHAR Type Date to dd.mm.yyyy in SQL Server

Hello everyone. In this article, I will try to give information about converting VARCHAR type date as dd.mm.yyyy in SQL Server.

In SQL Server, in some cases, you may want to convert the VARCHAR type date to dd.mm.yyyy.

You can easily do this using the code below.

DECLARE @tarih VARCHAR(30) = '5.06.2023'
SELECT
	CONVERT(VARCHAR, CONVERT(DATE, @tarih, 104), 104)

When you run the above code, you will see a result similar to the one below.

Converting VARCHAR Type Date to ddmmyyyy in SQL Server

 

As you can see, we have converted the VARCHAR type date as dd.mm.yyyy.

Good luck to everyone in business and life.

 

14 Views

Yavuz Selim Kart

I try to explain what I know in software and database. I am still improving myself by doing research on many programming languages. Apart from these, I am also interested in Graphic Design and Wordpress. I also have knowledge about SEO and Social media management. In short, I am a determined person who likes to work hard.

You may also like...

Don`t copy text!