The Vanilla Thrilla
The Vanilla Thrilla

Reputation: 1995

Convert a datetime column into a specific date format. (T-SQL)

I have a datetime column (SellDate) that I want to output in the following format:

mm/dd/yyyy

such as 06/01/1998

How would I do this? Thanks in advance!

Upvotes: 1

Views: 12293

Answers (2)

gautam shukla
gautam shukla

Reputation: 21

to get date in DD/MM/YYYY convert(varchar(10), TransactionDateTime, 103) OutPut: 01-07-2018

Upvotes: 0

Alex K.
Alex K.

Reputation: 175748

Convert it to a string with the appropriate conversion style;

convert(varchar(10), thedatecol, 101)

Upvotes: 10

Related Questions