Forum Discussion
Dataflow Gen2 Input Parameter Issue with Date-Time value
- 1 year ago
Hi EricParvin,
Define your parameter as datetime in the dataflow, not text, if that’s how it’s used in M.
If you must use text, manually cast it to a datetime inside Power Query using DateTimeZone.FromText() or DateTime.FromText()
If your DateField is just datetime, strip the timezone from the parameter. This keeps the DateField type as datetime, and converts the parameter to match:
try below query i tried to repro:
let
Source = Table.FromRecords({
[ID = 1, DateField = #datetime(2025, 05, 21, 12, 0, 0)],
[ID = 2, DateField = #datetime(2025, 05, 21, 14, 0, 0)]
}),
DateTimeParsed = DateTime.From(DateTimeZone.FromText(DateTimeParam)),
Filtered = Table.SelectRows(Source, each [DateField] > DateTimeParsed)
in
FilteredThanks,
Prashanth Are
MS Fabric community support
Hi EricParvin It might be because the 2025-05-21T13:00:00Z string isn't being interpreted correctly in the ODATA query due to formatting issues. Try passing the datetime as a plain string, like 2025-05-21 13:00:00, or ensure the format matches what ODATA expects another way you can try is to pass the date and time separately and combine them in Power Query, as this approach has already worked for you.