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
As of now, input parameters for a dataflow gen2 do not allow for date/time type. I am limited to string.
I will try this suggestion to see if it makes a difference in the ODATA query.
@EricParvin, As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query