Forum Discussion

freelensia's avatar
freelensia
Icon for Advocate II rankAdvocate II
6 years ago
Solved

Filter a date column by dates after a certain date coming from a variable

I have stored a certain PastThreshold  date from Excel named range like this. As you can see the final value is already formatted as date:

Next, I want to filter a certain Date column from a table to be AFTER PastThreshold

I get the "We cannot apply operator < to types DateTime and Date" error.
However both of the values are already formatted as date.

Can somebody help me?

  • Hi freelensia 

    Are you sure PastThreshold is stored as date and not DateTime? In the first pic you show, the icon seems to have a clock, which would indicate DateTime. The result shown at the top also shows the time  (2016/01/01 12:00:00) 

2 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi freelensia 

    Are you sure PastThreshold is stored as date and not DateTime? In the first pic you show, the icon seems to have a clock, which would indicate DateTime. The result shown at the top also shows the time  (2016/01/01 12:00:00) 

    • freelensia's avatar
      freelensia
      Icon for Advocate II rankAdvocate II

      Thanks that was indeed the problem. I converted the variable using DateTime.Date(xxx) and that fixed the problem.