X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Question about Calculating between dates excluding weekends and holidays, Any Version    
post Feb 13 2018, 06:32 PM

Posts: 5
Joined: 7-February 18

NOTE: This question was originally posted as a reply to this discussion from 2010.

Hi Steele,

I have tried the VBA code that given by Gustav (http://www.UtterAccess.com/forum/index.php?showtopic=1947978). It is working fine except one case.
If Start date 14-02-2018 01:48:55
End Date 14-02-2018 23:40:44
In the above case work start and finished on same day, but query return '0' value. So please help to fix this, and also suggest how to include time also in this query.

Please help to fix the above case, Thanks in advance

Go to the top of the page
post Feb 14 2018, 10:43 AM

UA Admin
Posts: 34,587
Joined: 20-June 02
From: Newcastle, WA

Welcome to UtterAccess

This is expected behavior. It happens on the same day, so there is no difference in the dates, i.e. the days elapsed is 0.

To add a time component, you'll need to use a calculation that includes time.

The obvious question, therefore, is whether your start and end dates are stored that way, which it appears they are from your question.

So, to make the change, you'll need to calculate the difference between start and end dates as Minutes, not Days. You'll then need to convert the number of minutes to hours and minutes by dividing the total by 60.

Give it a try. See if you can figure out the changes by modifying the code you have from "days" to "minutes" difference.
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    23rd February 2019 - 08:52 AM