Forum Discussion
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 format, and looks like this:
Can anyone fix my formula so I dont get an error when a TF record is found?
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]
2 Replies
- HotChilli
Community Champion
Please, if you get an error and want help you really have to post the error message. Also, Duration takes 4 parameters
- m_roussakis
Helper III
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]