Hi,
I am calculating date difference using below formula. Below formula shows the difference between dates and add text "Day" to the DataCard. For Ex: Datediff between 01Mar-01 Mar = "1 Day" gets displayed on DataCard. However, Let's say if the date difference is more than 1 day, then I would like to display text "Days" instead of "Day". Ex: 01 Mar-02 Mar= 2 Days should get displayed in the DataCard. I am not sure how to achieve this ?
DateDiff(DatePicker1.SelectedDate,DatePicker1_1.SelectedDate)+1 & " Day"
Thanks in advance for your time!
Solved! Go to Solution.
Please consider changing your Formula to the following:
With({_diff: DateDiff(DatePicker1.SelectedDate,DatePicker1_1.SelectedDate)+1},
_diff & " Day" & If(_diff<>1, "s")
)
I hope this is helpful for you.
Try
DateDiff(DatePicker1.SelectedDate,DatePicker1_1.SelectedDate)+1 & If(DateDiff(DatePicker1.SelectedDate,DatePicker1_1.SelectedDate)+1 >1," Days"," Day"))
Please consider changing your Formula to the following:
With({_diff: DateDiff(DatePicker1.SelectedDate,DatePicker1_1.SelectedDate)+1},
_diff & " Day" & If(_diff<>1, "s")
)
I hope this is helpful for you.
User | Count |
---|---|
179 | |
114 | |
88 | |
44 | |
42 |
User | Count |
---|---|
226 | |
113 | |
112 | |
69 | |
67 |