Convert date from dd-mm-yyyy to yyyy-mm-dd in SQL Server

0 votes

Given date:

DECLARE @Date1 VARCHAR(50) = '30-01-2015'

I want to convert it into the 2015-01-30.

Aug 18, 2022 in Database by Kithuzzz
• 38,000 points
6,155 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

Convert Date format into DD/MMM/YYYY format in SQL Server

Using convert() and style 106, you can ...READ MORE

answered Feb 23, 2022 in Database by Vaani
• 7,070 points
14,092 views
+1 vote
1 answer

how to change format of date from mm/dd/yyyy to dd-mmm-yyyy in MS Excel

First, pick the cells that contain dates, ...READ MORE

answered Apr 11, 2022 in Database by gaurav
• 23,260 points
158,829 views
0 votes
0 answers
0 votes
1 answer

How to convert date to a format `mm/dd/yyyy`

Your data is already in varchar, thus ...READ MORE

answered Sep 10, 2022 in Database by narikkadan
• 63,600 points
4,212 views
0 votes
1 answer

How to extract only the year from the date in sql server 2008?

To obtain the year from the given ...READ MORE

answered Sep 15, 2022 in Database by narikkadan
• 63,600 points
914 views
0 votes
1 answer

Convert Rows to columns using 'Pivot' in SQL Server

You can use the PIVOT function to ...READ MORE

answered Feb 8, 2022 in Database by Vaani
• 7,070 points
1,604 views
0 votes
1 answer

Difference between datetime and timestamp in sqlserver?

Timestamp is a synonym for rowversion, according ...READ MORE

answered Feb 16, 2022 in Database by Vaani
• 7,070 points
4,908 views
0 votes
1 answer

How to convert DateTime to VarChar

With Microsoft Sql Server: -- -- Create test case -- DECLARE ...READ MORE

answered Feb 23, 2022 in Database by Neha
• 9,020 points
1,192 views
0 votes
1 answer

How Can I use "Date" Datatype in sql server?

There's problem in all of them and ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
1,344 views
0 votes
1 answer

Compare two dates with JavaScript

 The Date object will do what you ...READ MORE

answered Feb 18, 2022 in Java by Rahul
• 9,680 points
729 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP