Wednesday, September 11, 2019

SQL Query to convert Date from MM/DD/YYYY to YYYY-MM-DD Format

Date Format Conversion:

MM/DD/YYYY to YYYY-MM-DD

Declare @DateFormat varchar(20)
set @DateFormat='02/21/2019' --MM/DD/YYYY

Select @DateFormat as SourceFormat, CONVERT(Date,@DateFormat,101) as TargetFormat






No comments:

Post a Comment