Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DATEDIFF

Hello, 

I want to get date different but the answer is wrong. I try to change format of contact date vaule but it is not working. 

Pleae refer to below for detial. 

 

===  =======

Recency =
IF(ISBLANK(Trans[CUSTNUM1]), BLANK(),
VALUE(DATEDIFF((01/01/2015),(Trans[Last Visit Date]),DAY)))
 

=================

 

Please help me check error.

 
 

 

 

  • Anonymous , try like

    Recency =
    IF(ISBLANK(Trans[CUSTNUM1]), BLANK(),DATEDIFF(date(2015,01,01),Trans[Last Visit Date],DAY))

3 Replies

  • Anonymous , try like

    Recency =
    IF(ISBLANK(Trans[CUSTNUM1]), BLANK(),DATEDIFF(date(2015,01,01),Trans[Last Visit Date],DAY))
  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    you have incorrect date. try DATE()

    Recency =
    IF(ISBLANK(Trans[CUSTNUM1]), BLANK(),
    VALUE(DATEDIFF(DATE(2015,1,1),(Trans[Last Visit Date]),DAY)))

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks you so much. 

      But my update data table