Visokio website     Downloads     Video tutorials     KnowledgeBase  
Working Day Formula - Visokio Forums
Working Day Formula
  • Allan June 2, 2009 4:28PM
    Have two dates formatted below

    dd/mm/yy hh:mm:ss

    Can we have a formula that will enable us to calculate the working hours/mins (based on a 7hrs working day) between them. We must take into account that the two dates/times may span more that one day.
  • 11 Comments
  •     steve June 3, 2009 9:29AM
    Noted. Would a simple 5-day week with optional hours-per-day function work, or is a system accurately representing the national holidays for a given country required? The latter would be far more complex and would need significant demand to be developed.
  •     steve June 3, 2009 9:31AM
    If both dates are date+time values, you'd need to specify not just the length of the working day, but also the start time and end time, in case some values were at times outside working hours.
  • Allan June 3, 2009 9:37AM
    Indeed, a simple 5-day with an hour option say 7 - 19:00
  •     chrisamott February 26, 2010 2:02PM
    An extension of this is the ability to determine whether dates are workdays in a table, port those to a graph and omit none working days from the time axis. this would eliminate flat spots, or flat intervals, in a time graph. Unless of course this is already possible.
  • Guy_Cuthbert        Guy_Cuthbert March 1, 2010 9:36PM
    Chris

    Your extension is relatively easy to address, I think, using existing formulae:

    * Create a new Formula Field "Is working day?"

    IF(OR(DATETOTEXT([A],"EE")="Sat",DATETOTEXT([A],"EE")="Sun"),"N","Y")

    This is oversimplistic in that it will not account for bank holidays, but it will enable you to filter so that you only have dates which fell on Mon-Fri... hope that helps?

    Regards

    Guy
    Atheon Analytics Ltd
    w: www.atheonanalytics.com
    e: guy.cuthbert@atheon.co.uk
    t: +44 8444 145501
    m: +44 7973 550528
    s: guycuthbert
  •     chrisamott March 3, 2010 2:22PM
    Thanks for the post Guy. I have a formula which determises the day of the week and from there I can filter as needed. My real problem, forgive me this wasn't clear in my post, is that of flat intervals. Tables containing financial data are null for the weekends. Omniscope retains the date in the axis in graph view but has nothing to plot. This results in a horizontal line drawn from the last data point on the Friday to the first data point on the Monday. What I would actually like to do is remove any null dates from the axis which should then remove all the flat intervals, essentially joiing the Friday point to the Monday point. This would provided a clearer view of the data being presented and remove all unnecessary dates.
  •     steve March 3, 2010 2:35PM
    Chris,

    You could use formulas to ensure even intervals on the X axis, but you would lose the date values. Really, this is a feature request for a working days date scale in the graph axes.

    Steve
  • liam March 3, 2010 3:01PM
    As a workaround you could have a separate field which is a textual representation of the date and set this to be categories. If you set the x-axis to be this field you would not see any dates which did not have values, which would fix the problem as long as all the other dates had values.

    You would need to set the date format of this textual representation to be something which is correctly sortable as text, such as "yyyy-MM-dd" (sorts by year first, then month, then date, because text is sorted using the characters from left to right), to ensure you did not have to go in and manually order the dates.
  •     chrisamott March 3, 2010 4:08PM
    Steve, I think that is the solution I am looking for.

    Liam, thanks I'll give it a go as an interim.
  • Allan April 2, 2010 10:25AM
    Sorry guys, is there a formula i can use to sort out my original issue. I still need to display time actuatly

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership