Date, Number, and String Functions


We'll begin with dates. Dates are often written in the following format

1. Date: YYYY-MM-DD

2. Datetime or Timestamp: YYYY-MM-DD hh:mm:ss

We can use SQL's date functions to transform data into a desired format. Since date functions can be database specific, verify the functions that exist on your relational database management system.

For example, this statement

SELECT DATETIME(manufacture_time)
FROM baked_goods;

Would return the date and time for the manufacture_time column.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.