progress bar based on date

mcgraw

Registered User.
Local time
Today, 08:33
Joined
Nov 13, 2009
Messages
77
I'm trying to figure out how to create a progress bar based on the date a project was opened, and estimating the average time it should take...

For example, if I say the average time to complete a standard routine is 365 days (a constant), and I use datediff() to show a project has been open for 182 days, I want to have a progress bar fill 1/2 way up...and then if it goes beyond the 365, I want it to turn red, or somehow show it is in a problem state.

I've looked at different progress bar posts, and they all appear to be based on time to load, or progress through a task, and don't really apply to what I am trying to accomplish.

Anyone have any success with something like this?

Many Thanks :D
 
A progress bar usually has a value associated from 0 to 100. So all you have to do is figure out the percentage (in whole numbers) and assign the value that way.

([TimeTaken] *100)\ ([TotalTimeAllowed])*100)

note the backwards slash which divides in whole numbers.
 

Users who are viewing this thread

Back
Top Bottom