i have a two data field ,FromDate,ToDate of data type Date.i want to calculate the duration between these two dates and want to assign the result to the Tenure field of datatype DateFormula.?
*This post is locked for comments
i have a two data field ,FromDate,ToDate of data type Date.i want to calculate the duration between these two dates and want to assign the result to the Tenure field of datatype DateFormula.?
*This post is locked for comments
Thanks Suresh Sir
Javed,
You can also use ABS function to return it as positive
EVALULATE(Tenure,'<' + FORMAT(ABS(ToDate-FromDate)) + 'D>')
Thanks everyone its working
use Todate first as it is bigger EVALUATE(Tenure, '<' + FORMAT(ToDate - FromDate) + 'D>');
HI
its working ,but there is minus sign with duration values;
fromDate=010515 todate :=150515
tenure:=-14D
Can you please let us know what did you try? and what didn't work? and how are you expecting it to work? with example
Hi
i tried but it didnt worked out
Hi Javedakhtar,
EVALUATE(Tenure, '<' + FORMAT(ToDate - FromDate) + 'D>');
Hi,
FromDate - ToDate will give you the number of days between these two dates. In order to use that in the DateForumula, you may use the below example:
NewDate := CALCDATE(FORMAT(FromDate - ToDate) + 'D',TODAY)
In the above example, program will add the difference of two dates to TODAY.
Hi Javed,
You need to declare one integer variable e.g. duration and then
duration = ToDate - FromDate;
it will gives you duration between two dates and you can use that value in dateformula field .
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156