Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can change date format like this formt 8-14 in sql server
Posted
Comments
OriginalGriff 24-Apr-14 5:33am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Perhaps an example of your inputs and outputs would help?
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Hi,

You have to apply a specific date format.
Example:
SQL
DECLARE @MyDate DATE = '2014-08-14';
SELECT CONVERT(VARCHAR(8), @MyDate, 10) AS [MM-DD-YY];

The result:
XML
MM-DD-YY
08-14-14

Date formats:
SQL Server Date Formats[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900