General discussion

Locked

formula in VisualBasic

By kawa ·
How to count business hours within datarange in VisualBasic. I need very flexible formula becouse
I have to consider workhours, ordinary workdays (Mo-Fr or Mo-Sa or Mo-Su) and holidays.

Anyone could help, please?

Regards,
Kamil

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

formula in VisualBasic

by DKlippert In reply to formula in VisualBasic

One of these sites may have the information you can massage into VB to calculate dates and times.

For Access:

www.mvps.org/access/tocurl.htm#Date/Time

For Excel:

www.cpearson.com/excel/datetime.htm#TOC

Collapse -

formula in VisualBasic

by kawa In reply to formula in VisualBasic

The question was auto-closed by TechRepublic

Collapse -

formula in VisualBasic

by john_wills In reply to formula in VisualBasic

I don't find this question well enough defined to allow me to suggest any answer. I presume "datarange" means "date range", and I have done totalling over date ranges. Where are the business hours? in a table, on a form?

Collapse -

formula in VisualBasic

by Shanghai Sam In reply to formula in VisualBasic

Poster rated this answer

Collapse -

formula in VisualBasic

by prashant_bajaj In reply to formula in VisualBasic

U can use the DateDiff function. It has the following syntax :
DateDiff(Interval As String, Date1, Date2)

Pass Interval as "hh" to calcute hours, and "mm" to calulate total time difference in minites.
Date1 and Date 2 should be the starting andending dates, please see do not forgoet to pass time with date, ie dont just pass the dates, add the time stamp also. I am sure this will help. Let me know if something is not clear, i will make a small smaple application here and forward it to you.

Collapse -

formula in VisualBasic

by kawa In reply to formula in VisualBasic

The question was auto-closed by TechRepublic

Collapse -

formula in VisualBasic

by kawa In reply to formula in VisualBasic

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums