Skip to main content

Notifications

Building model-driven apps with Microsoft Datav...
Suggested answer

DateDiff

Posted on by
Hi guys, please i am having issues with creating table of Observed with this code DateDiff('Date Observed',Now(),TimeUnit.Days). I have been on this issue for days. Please help
Categories:
  • Suggested answer
    DJ-27081057-0 Profile Picture
    DJ-27081057-0 2 on at
    DateDiff
    DateDiff('Date Observed',UTCToday(),TimeUnit.Days)
     
    Replace with UTC Today, however as per description it seems incorrect in the video.
     
    Field is Reporting Days
    How long it took to first report the issue in days
     
    It should have been date observed - created on date in days
     
  • Suggested answer
    CU25081117-0 Profile Picture
    CU25081117-0 2 on at
    DateDiff
    I was having same issue then I used this:
     
    //
    DateDiff('Date Observed',UTCNow(),TimeUnit.Days)
  • Suggested answer
    Glynnryan Profile Picture
    Glynnryan 24 on at
    DateDiff
    To get this working, you can use the formula:
     
    DateDiff('Date Observed',UTCNow(),TimeUnit.Days)
    Alternatively, you could try changing the table column for Date Observed to a Date and Time column and not just Date Only. However, this could have an impact on other app functions later on.

Helpful resources

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,745

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard

Featured topics