0

daysBetween function returning wrong value for me.

Hi, I have a requirement where I need to create a report to calculate a total sales by Brand/Product for 30days/60days/90days. 

I am trying to create a custom column for 30days/60days/90days calculation. So prior I want to find the difference between the sales order date  using function daysBetween($currentDate,timestamp("2019-04-20")) but I am not getting the appropriate result.

Can some one help me with the steps to achieve this. 

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Praveen,

    Can you please use date function instead of timestamp in your formula.  Something like : daysBetween($currentDate, date('2019-04-20'))

    daysBetween expects both variables of type Date, not timestamp.

    Reply Like
    • Hichem Sellami  Thank you for the reply. Yes you are correct yesterday I have tried with date and it was working as expected.

      -Cheers

      Praveen.

      Reply Like
Like Follow
  • 6 mths agoLast active
  • 2Replies
  • 56Views
  • 2 Following