I have been searching for formulae that properly displays remaining daylight in a progress bar format. Any help with this?

I have tried various formula for Min, max and level to create a progress bar to display remaining daylight. Are there any out there that work properly?

I have created formula that work in text form to create my values, but none of them display properly when plugged into the progress bar format. Any help would be much appreciated.

Sure, do this

  • Create a progress bar
  • Set progress to "custom"
  • Leave min to 0 and max to 100 (you can change it off course), lets say 0 is sunrise (so all day left) and 100 is sunset (so daylight is over)
  • Select the "level" option (which goes from 0 to 100) then click on the formula icon to make it a formula
  • Now use something like $100 / (ai(sunset) - ai(sunrise)) * (ai(sunset) - df(S))$ to get the the percentage of daylight passed, the formula can be broke down in this way
    • So 100 / "total segments" * "current segment"
    • Total segments is the number of seconds of daylight "ai(sunset) - ai(sunrise)" will give you that by subtracting seconds of the sunset with the sunrise one
    • Current segment is instead "ai(sunset) - df(S)" which means seconds of the sunset minus seconds of now