**# DATETIME FORMAT'S**
SELECT
date,
convert(date,date), -- function to convert date from the column 'date'
convert(date,datetime) -- same but add the time a 00:00 set by default
FROM bank.account;
SELECT
issued,
substring_index(issued,' ',1),
convert(substring_index(issued, ' ',1),date)
-- using substring_index to convert the date format in the column 'issued'
FROM bank.card;
SELECT
date,
date_format(convert(date,date),'%Y-%M-%D'),
-- Function to format the dates in diferent examples 'most used format'
date_format(convert(date,date),'%Y')
-- Same Function Example but just to show the Year = '%Y'
FROM bank.loan;