2 Attachment(s)
[RESOLVED] Calculation with dates...situation 2.
Hi Guys, you already gave me some good help and I'm very glad for it. Now I have another situation for my application, you guys helped me separating values, but I tried everything copied the other code...but I have serious begginer problem :)
Pls check the image and if possible the code, mny tks
Re: Calculation with dates...situation 2.
I updated the topic, could you check and if possible help me. Thank you!
Re: Calculation with dates...situation 2.
Does this help?
VB Code:
Private Sub Command1_Click()
a = "00:40"
b = "00:25"
Hr = Val(Left(a, 2)) - Val(Left(b, 2))
Min = Val(Right(a, 2)) - Val(Right(b, 2))
Diff = Format(Hr, "00") & ":" & Format(Min, "00")
'I have used a messagebox to display result
'you can store it in a variable...
MsgBox Diff
End Sub
Re: Calculation with dates...situation 2.
Ok ! I did a very crazy thing cause I'm working with hours and values could not be less than 0...so far it worked.
Guy thank you a lot helping me!
Now I have to create an array :cry: hahaaha