0 Comments

If you want to convert a date to a string in the format "dd-mm-yyyy" in T-SQL, you can use the following code:

 

declare @Now date = '2014-01-22'
select convert(varchar(10), @Now, 105)

Result

image

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts