Split a timestamp into its date and hour (web orders)
Each event has a text timestamp like 2026-03-04T14:30:00. Add a real Date and the Hour of day.
- Level
- intermediate
- Time
- ~7 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Convert text to datetime, then take its date part and hour.
The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.
Input
- Events (table)
- EventID: text
- Timestamp: text
Expected output columns
EventID (text), Date (date), Hour (number)