...make the interval portion of the DateAdd() a negative number...But I need now to subtract times:
Hi
I need to add between two times, like this:
timeVar=[TimeVar1]+[TimeVar2]
17:05:50=08:01:10+09:04:40
Any idea how?
Thanks
Public Function AddTimes(dteTime1 As Date, dteTime2 As Date) As Date
Dim inthr1 As Integer
Dim intmin1 As Integer
Dim intsec1 As Integer
Dim inthr2 As Integer
Dim intmin2 As Integer
Dim intsec2 As Integer
Dim inthrNew As Integer
Dim intminNew As Integer
Dim intsecNew As Integer
inthr1 = Format(dteTime1, "h")
intmin1 = Format(dteTime1, "n")
intsec1 = Format(dteTime1, "s")
inthr2 = Format(dteTime2, "h")
intmin2 = Format(dteTime2, "n")
intsec2 = Format(dteTime2, "s")
inthrNew = inthr1 + inthr2
intminNew = intmin1 + intmin2
intsecNew = intsec1 + intsec2
AddTimes = TimeSerial(inthrNew, intminNew, intsecNew)
Exit Function
I need to add between two times, like this:
timeVar=[TimeVar1]+[TimeVar2]
17:05:50=08:01:10+09:04:40
Any idea how?
Hi
I need to know how to do simple addition:
[timevar]=[timevar]+[number]
example:
8:00+9=17:00
Thanks
I need know to add strings, how to add for example: