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

Code Example 1

DATE - format YYYY-MM-DD

Code Example 2

DATE - format YYYY-MM-DD
DATETIME - format: YYYY-MM-DD HH:MI:SS
TIMESTAMP - format: YYYY-MM-DD HH:MI:SS
YEAR - format YYYY or YY

Learn ReactJs, React Native from akashmittal.com