Format elapsed days as # weeks, #days | Community
Skip to main content
New Participant
Sep 13, 2019 5:07 PM UTC
Question

Format elapsed days as # weeks, #days

Hi, I created a calculated column to calculate the number of days between Planned Completion and Planned Start. Is there anyway to format the result in number of weeks as opposed to number of days. Michele Banks Christus Health
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

Level 3
Jun 9, 2020 6:46 PM UTC

This actually worked for me. Thank you!!

Translate
New Participant
Sep 17, 2019 7:01 PM UTC
I'm using the Task Duration. Michelle Banks Christus Health
Translate
William--
New Participant
Sep 16, 2019 9:42 PM UTC
Hi Michelle, are you copying/pasting the entire code, or just certain lines? You should be copying/pasting the entire code. Also, what object type are you viewing? This was tested on Projects. William English T-Mobile
Translate
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
New Participant
Sep 16, 2019 6:14 PM UTC
Thanks so much for responding. Unfortunately - it doesn't seem to like the format statement. Each time I try to add valueformat=compound#M:D The system erases it. displayname=Duration in Weeks durationunitfield=durationUnit.value linkedname=direct namekey=duration querysort=durationMinutes textmode=true valueexpression=CONCAT(ROUND(DIV({durationMinutes},60,8,5),1)," Weeks") valuefield=durationMinutes valueformat=compound viewalias=duration Michelle Banks Christus Health
Translate
William--
New Participant
Sep 15, 2019 7:03 AM UTC
I would love to know a valueformat that displays in progressively smaller units of measure like "X Weeks, X Days" but I've had to settle for the below, which would display the value in weeks with a decimal (e.g. "4.5 Weeks") displayname=Actual Duration linkedname=direct namekey=actualduration querysort=actualDurationMinutes textmode=true valueexpression=CONCAT(ROUND(DIV({actualDurationMinutes},60,8,5),1)," Weeks") valuefield=actualDurationMinutes valueformat=compound#M:D viewalias=actualduration William English T-Mobile
Translate
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf