Expand my Community achievements bar.

Milestone Duration from Today

Avatar

Level 2
How can I use view in a report to return the number of days between a milestone set in a custom form for "todays" date? I have tried using the DATEIFF without success. I have pasted the code that I thought would work below. Then can WF build a chart using that data? DATEDIFF(MS6 - ACD,$$TODAY) displayname=Duration of Materials Request textmode=true valueformat=doubleAsString Nathan Barnhill Altice
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Level 10
Hi Nathan, You're on the right track. To perform such an on the fly calculation in the view (assuming that "MS6 - ASD" is the custom date parameter against which you are trying to calculate the difference from today, in days), set the valueexpression, like this: valueexpression=DATEDIFF({ DE: MS6 - ASD } ,$$TODAY) displayname=Duration of Materials Request textmode=true valueformat=doubleAsString However, although this should then give you the days you are after each time the view this column is in gets refreshed in a browser, they cannot be charted: Workfront's charting engine can only chart off data that is stored in Workfront's database. And although you could adopt the formula above into a calculated parameter which would then store the resulting value in the database, it would quickly become "stale", unless you recalculated it every day (which is possible, but another topic). Regards, Doug P.S. corrected misleading "d" parameter in original post -- thanks Narayan Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
Doug, what is the significance of the "d" in your example? If "Days", are there other options available there? This is very useful if so!

Avatar

Level 10
Arg. Sorry Narayan, My mistake. There is no "d" parameter within Workfront's DATEDIFF function. I've been doing some VBA coding lately, which does allow for "d", "m", "h", etc. That said, knowing that Workfront's result comes back in DAYS, you could also get (approximately) the same result by then dividing by 30-ish to get months, or multiplying by 24 to get hours, etc.. I'll go wipe my tracks on the original post Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads