Forum Discussion

NumeroENAP's avatar
NumeroENAP
Helper III
6 years ago
Solved

Getting errors with a column transformation (future dates to today's date)

Hi,   I want to replace future dates in my column by today's date, but i'm only getting errors.    My query :  = Table.TransformColumns(#"LastLine", {"Date created", each if [Date created] > (Da...
  • Jimmy801's avatar
    Jimmy801
    6 years ago

    here the correct version of your syntax

     

    = Table.TransformColumns(#"LastLine", {"Date created", each if _ > (DateTime.FixedLocalNow()) then Date.From(DateTime.FixedLocalNow()) else _, type date})



    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy