How can i show the day number and hour when a task started/stopped RRS feed

  • Question

  • Hello! I'm new to Microsoft Project and I have a question:

    I want a column which shows for a task: 

    The Day Number when it started + Hour - The Day Number when it stopped it stopped + Hour 

    Something like this:

    Action 1                 Day 1 Hour 7 - Day 1 Hour 8
    Action 2                 Day 1 Hour 8 - Day 1 Hour 9

    I am aware of this topic:

    and this blog post:

    But I can't seem to create the complete formula in a single column. I dont know how to concatenate string, how to write the formula for generating the last day and so on.

    Please, I am grateful for any advice.

    And another question: where could I find some good resourse to learn about Microsoft Project and formulas?    

    • Edited by Andrewx21 Saturday, March 30, 2019 12:14 PM
    Saturday, March 30, 2019 11:10 AM


All replies

  • Andrewx21,

    This formula should work for you (in a text field):

    "Day " & (DateDiff("d",[Project Start],[Start])+1) & " Hour " & Hour([Start]) & " - " & "Day " & (DateDiff("d",[Project Start],[Finish])+1) & " Hour " & Hour([Finish])

    As you see, the ampersand ("&") is the string concatenation operator.

    Re. your quest for learning resources, you've found one of the right spots.  Here are some more links:

    Microsoft Community

    Microsoft Project Users

    Project MVPs References (OLD)

    Ismet's E-Book on Project Formulas

    Good luck, tom
    • Edited by Tom BoyleBPC Saturday, March 30, 2019 1:58 PM
    • Marked as answer by Andrewx21 Saturday, March 30, 2019 2:10 PM
    Saturday, March 30, 2019 1:58 PM
  • Thank you. It's working. 

    I will check the resources you posted. Thanks again. 

    Saturday, March 30, 2019 2:11 PM
  • I encounter a situation in which I need to provide the same thing, but based on WORKING days.

    I didn't have the time to check the resources. I'm sorry if I am too demanding with my questions.

    I understand that the duration field provides the duration of working days. The start and finish columns provide the calendaristic dates.
    • Edited by Andrewx21 Tuesday, April 2, 2019 12:28 PM
    Tuesday, April 2, 2019 12:25 PM
  • Andrewx21,

    Though I see essentially zero value for the output in a modern project schedule, this formula would provide the same output except that day numbers are in working days from the project start.  (Hour numbers are still the hour of the day.)

    "Day " & ProjDateDiff([Project Start],[Start],[Project Calendar])/[Minutes Per Day]+1 & " Hour " & Hour([Start]) & " - " & "Day " & (ProjDateDiff([Project Start],[Finish],[Project Calendar])/[Minutes Per Day]) & " Hour " & Hour([Finish])

    Good luck, tom

    Tuesday, April 2, 2019 3:38 PM
  • Andrewx21,

    I'm in a little conundrum about responding to your latest post. Tom took the time to provide the formula you asked for and also to provide multiple resources for your stated desire to learn more about formulas in Project. Then you respond by saying you need something more but you didn't have time to check the resources. Lazy?

    Okay, I'll give you the benefit of the doubt. Here is Tom's formula revised to provide working days, except I left out a couple of things which I'll leave as an exercise for you to determine. Hint, compare this to Tom's original formula to find the missing parts.

    "Day " & (DateDiff("d",[Project Start],[Start])) & " Hour " & Hour([Start]) & " - " & "Day " & (DateDiff("d",[Project Start],[Finish])) & " Hour " & Hour([Finish])

    Show us you are not to demanding.


    Tuesday, April 2, 2019 3:40 PM