Check out example codes for "sql date format". It will help you in understanding the concepts better.

Code Example 1

SELECT DATE_FORMAT("2017-06-15", "%Y");

Code Example 2

convert (varchar , getdate()-1 , 112)

Code Example 3

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

Code Example 4

Cast( '2011-07-07' as date ) as convertedDate

Code Example 5

convert( datetime, fecha, 103 )

Learn ReactJs, React Native from akashmittal.com