Forum Discussion

m_roussakis's avatar
m_roussakis
Icon for Helper III rankHelper III
2 years ago
Solved

Looking to subtract time from a date.Time column in Power Query

I have this formula :   new column = if [EVT_CD] = "TF" then [EVT_TMSTMP] - #duration(0, 1, 0) else [EVT_TMSTMP] but it gives me an error in new column. My [EVT_TMSTMP] column is in Date/Time...
  • m_roussakis's avatar
    2 years ago

    Your mention of requiring 4 parameters jogged my memory and i was able to fix this. Thanks!

    = if [EVT_CD] = "TF" then [EVT_TMSTMP] - #duration(0, 0, 1, 0) else [EVT_TMSTMP]