Skip to main content

Notifications

Power Up Program - Building model-driven apps w...
Suggested answer

DateDiff showing result in minutes by default

Posted on 18 Nov 2024 00:23:53 by
Good day
I am using DateDiff, as follows 
 
If(And(!IsBlank('OpeningDate'), !IsBlank('ClosingDate')),
DateDiff('OpeningDate','ClosingDate'),
""
)

The result is the right number, but it shows the unit of measure minutes. When I add the TimeUnit.Days, it divide the result by 60 and shows the number in hours.

OpeningDate and ClosingDate are "Date and Time" data type. 

 
Thanks for your help
Categories:
  • Suggested answer
    kasraouiah Profile Picture
    kasraouiah 172 on 18 Nov 2024 at 03:58:44
    DateDiff showing result in minutes by default
    Hello,
    You should define TimeUnit
    DateDiff('OpeningDate','ClosingDate',TimeUnit.Minutes)
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard

Featured topics