Downloads
Power Query MDate and timeBeginner

DateTime.Time

Returns the time part of a date and time, with the date removed.

Syntax
DateTime.Time(dateTime as nullable datetime) as nullable time

Returns: The time of day, or null when the input is null.

What it does

DateTime.Time keeps the time of day and drops the date. Finance uses it for cut-off rules that depend on the hour, such as a bank that only processes wires received before 2:00 PM, or a payment run that picks up approvals made before a set time. The result is a time value, so it can be compared with another time.

Syntax and arguments

Example

A bank processes incoming wires the same day only if they are received before 2:00 PM. The team flags each wire that arrived after the cut-off, so it is posted the next business day.

let
    Wires = #table(type table [Wire = text, ReceivedAt = datetime, Amount = number],
        {{"W-7", #datetime(2026, 10, 29, 13, 45, 0), 9500},
         {"W-8", #datetime(2026, 10, 29, 14, 20, 0), 4200}}),
    WithTime = Table.AddColumn(Wires, "TimeReceived", each DateTime.Time([ReceivedAt]), type time),
    Late = Table.AddColumn(WithTime, "AfterCutoff", each [TimeReceived] > #time(14, 0, 0), type logical)
in
    Late

W-7 arrived at 13:45, before the cut-off, so AfterCutoff is false. W-8 arrived at 14:20 and is flagged true, so it moves to the next business day.

Example: a second, different use

Find payments that were made outside business hours by comparing the time with the start and end of the working day.

Things to watch

In business terms

Bank cut-offs, payment run deadlines and same day posting rules all depend on the hour a transaction was made. Flagging the late ones in the query means the next business day is applied by rule, not by memory.

Related functions

All Power Query M functions · View as Markdown · M basics