locked
SharePoint Workflow History List - Duration Column RRS feed

  • Question

  • Can someone please tell me what the Duration column in the Workflow History list is. I am trying to generate a small report of how long each workflow task is taking from the time of creation to the time of completion. The Duration column is a number field and seems to be the solution to my problem however I am not sure how to use the value in that column. It is a very large number and therefore cannot be the number of seconds. Any ideas how to convert that value to a unit of time, if it is not already??

    Thanks for all your help.
    • Moved by Mike Walsh FIN Thursday, July 23, 2009 7:01 AM wf q (From:SharePoint - Development and Programming)
    Wednesday, July 22, 2009 9:42 PM

Answers

  • I don't know the exact answer to your question, but in general, it looks like the documentation says that the Duration property of a workflow is of type "TimeSpan". The TimeSpan struct is broken down into "ticks". It looks like the Duration column itself is of type Number, so I'm guessing that number is storing a number of Ticks perhaps? (Just a guess.)
    Visit my blog at blog.beckybertram.com or follow me on Twitter: @beckybertram
    • Marked as answer by JohnXO Thursday, July 23, 2009 9:39 PM
    Wednesday, July 22, 2009 11:03 PM

All replies

  • Hi,

    Isn't there an 'Actual Duration' column which produces a time value in the format of hh:mm:ss? By the way, beware, by default the Workflow History is purged on 60 days.

    Regards,
    Hristo Yankov

    My blog - http://blog.myitechnology.com

    (Was my post helpful? If so, please indicate)
    Wednesday, July 22, 2009 10:34 PM
  • I don't know the exact answer to your question, but in general, it looks like the documentation says that the Duration property of a workflow is of type "TimeSpan". The TimeSpan struct is broken down into "ticks". It looks like the Duration column itself is of type Number, so I'm guessing that number is storing a number of Ticks perhaps? (Just a guess.)
    Visit my blog at blog.beckybertram.com or follow me on Twitter: @beckybertram
    • Marked as answer by JohnXO Thursday, July 23, 2009 9:39 PM
    Wednesday, July 22, 2009 11:03 PM
  • Moving to the Workflow forum
    WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
    Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
    Thursday, July 23, 2009 7:00 AM
  • Hristo,

    I do not see an Actual Duration column, just Duration. Also, it does not appear that our Workflow History list is being purged every 60 days. I ran an stsadm command to get the property of the auto clean up job and it is not set, so I guess the history list will grow indefinitely.
    Thursday, July 23, 2009 3:30 PM
  • Becky,

    Your guess was right on the money. By converting the ticks to a unit of time I was able to find out how long each task was taking from start o finish.

    Thank you very much for your help.
    Thursday, July 23, 2009 9:39 PM
  • Woohoo! Glad it helped. :)
    Visit my blog at blog.beckybertram.com or follow me on Twitter: @beckybertram
    Friday, July 24, 2009 11:59 AM
  • If you want to create a calculated column to display the Duration in Days:Hours:Minutes:Seconds, try the following formula:

    =INT([Duration]/10000000/60/60/24)&":"&MOD(INT([Duration]/10000000/60/60),24)&":"&MOD(INT([Duration]/10000000/60),60)&":"&MOD(INT([Duration]/10000000),60)

    You can probably add extra formatting to pad leading zeros, but at least the values are broken down this way.

    Wednesday, May 19, 2010 3:57 PM