Count days in date fields
Hi, we just set up an holidays calendar for our team. To get an quick overview of days left per employee, I want podio to count the days not only the entries. Is this possible anyhow? example: Tino planned holidays from 1.5.2014 to 3.5.2014 and from 2.7.2014 to 5.7.2014. I would need a statement showing "Tino 7 days". Hope you can help Best Tino

  • Thanks for the input Stefan, I have the calculation working on two date fields it's just that the calendar display doesn't quite work when using this method. For example, in a holiday planner app if you take 3 days off using the two date field methods the calendar shows entries for the first and third day but not the second whereas using the single date field method blocks out all three days. It's not a huge issue but it would be nice to either be able to work with the end date (of a single date field) in calculations or have the calendar recognise a date range on an item if there is a start date and end date field.
  • Hi Craig, the calc field currently cannot access the end date of date-fields, so you will have to split your date-field in two seperate fields. If you do that, then you can use the calc field to do what you want. BTW: the calc field actually includes the moment.js library, which is very handy if you need to work with dates. Have a look at the docs at momentjs.com/docs/ Best, Stefan http://www.diekollaborateure.com/go/podio/help
  • In relation to this is it possible to calculate the number of days between the start and end values of one date field? I have a setup similar to what you describe Jacquelyn, however using two separate date fields results in just the first and last date being added to the calendar rather than the block that gets added when you use a date range in one field. For the moment the workaround would be to use one date field and manually type the number of days but if this could be fixed/improved then that would be great.
  • Hi Tino, You'll need two separate apps for this. The first app will be the app where your employees add/request their time off. It'll need these fields: -Relationship field: Point it to the second app (you'll need to do a bit of back and forth as you set it up) -Date field: Start Date (disable the end date) -Date field: End date (disable the end date) -Calculation field: (@End date - @Start date) / 86400000. This converts the output into days (it is originally in milliseconds). In the second app you need: -Contact field (to designate which employee the item is for) -Calculation field: @Sum Calculation (from the first app) Note that this won't account for things like weekends and holidays - that would require a much more complicated script.
This question is closed.