In this video we will take at formatting both varchar and date field data types from YYYYMMDD to mm/dd/yyyy or mm-dd-yyyy. This is a very common issue for data analysts working with dates in SAP.
-- output mm/dd/yyyy
CONVERT (varchar(10), CAST([YOUR_FIELD_HERE] AS date), 101)
--output mm-dd-yyyy
CONVERT (varchar(10), CAST([YOUR_FIELD_HERE] AS date), 110)
-- where clause
--WHERE CAST(ERSDA_CHAR AS date) (....greater-than-symbol here....)= CAST('1/1/2020' as date)
YOUTUBE would not let me put the greater than symbol here in the comments