Casting dates
Oftentimes, you will want to conveniently parse a wide variety of date strings with as little code as possible.
In this exercise, you will take on the role of a software engineer at a fintech startup testing a search engine bot. For the purpose of performing financial data aggregation and data quality analysis, you have collected several sample date strings and put them into a table called dc_datestrings.
Latihan ini adalah bagian dari kursus
Time Series Analysis in PostgreSQL
Petunjuk latihan
- Convert the field
datestringin thedc_datestringstable intoDATEdata type.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- Convert the datestring data type
SELECT
___ AS dates
FROM dc_datestrings;