Forum Discussion

EricParvin's avatar
EricParvin
Microsoft Employee
1 year ago
Solved

Dataflow Gen2 Input Parameter Issue with Date-Time value

The data pipeline is passing in the string parameter value 2025-05-21T13:00:00Z to a dataflow gen2. The parameter in the dataflow is of type text and is used in an ODATA query. There error is Error D...
  • v-prasare's avatar
    v-prasare
    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
    Filtered

     

     

     

     

    Thanks,

    Prashanth Are

    MS Fabric community support