welcome Dear all
this my first topic in DANIweb so that I'm waiting for more than help ,
I try to design time calculator to calculate time by Minutes
you can see code
((((
Private Sub Command2_Click()
If Val(Text1.Text) = 0 Then MsgBox "type any Date and Time value": Exit Sub
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text6.Text = DateDiff("D", Text1.Text, Text3.Text)
Text5.Text = DateDiff("h", Text1.Text, Text3.Text)
Text7.Text = DateDiff("n", Text1.Text, Text3.Text)
Text8.Text = DateDiff("n", Text1.Text, Text3.Text)
End Sub
))))))))
now i want calculate time in work hours only (form 9AM till 5 Pm) and Ignore other time
for Example :
when i calculate time between this Duration
from : 11/10/2010 11:05 AM
Till : 13/10/2010 9:20 PM
program results:
3495 Minutes
--------
But This is not true I want my Results be same that :
first day = from 11:05 am till 5 pm = 355
second day= from 9:00 am till 5 pm = 480
thread day= from 9:00 am till 5 pm = 480 and Ignore time from 5PM till 9:20pm
Total Minutes = 355+480+480 = 1315 NOT 3495
This my Pro Image
this my E-mail
--snipped--