When did you check in?
Not only can you convert strings to datetime values, you can also manipulate these values themselves. Your manager has tasked you with further breaking down the date and time that gym members visit a certain location. Time to get to it!
Это упражнение является частью курса
Data Types and Functions in Snowflake
Инструкции к упражнению
- Update this query to cast the
checkin_timecolumn to aDATEstored in a column calledthe_date. - Add a final line to the
SELECTstatement to castcheckin_timeto aTIMEdata type and alias the resulting column asthe_time.
Интерактивное практическое упражнение
Попробуйте выполнить это упражнение, дополнив этот пример кода.
SELECT
checkin_time,
-- Cast checkin_time to DATE
___::___ AS the_date,
-- Cast checkin_time to TIME
___::___ AS the_time
FROM CORE_GYM.visits
;