Power QueryExercises

Split a timestamp into its date and hour (door access)

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
Free — no account needed
Loading the practice workspace…

About this exercise

What you'll practise

Convert text to datetime, then take its date part and hour.

Quillstack (fictional) analyses badge swipes at its office doors to plan cleaning shifts.

Steps

  1. Timestamp is text in ISO format (yyyy-mm-ddThh:mm:ss).
  2. Add Date (a date, not text) and Hour (a whole number 0–23) from it.
  3. Output EventID, Date, Hour.

Your result must

  • Date is a date value
  • Hour is 0–23
  • Three columns

Input

  • Events (table)
    • EventID: text
    • Timestamp: text

Expected output columns

EventID (text), Date (date), Hour (number)

First 3 of 6 expected rows
EventIDDateHour
D12026-02-2018
D22026-02-020
D32026-02-100