I\'m trying to convert a string into date
a = Datumo: 16.09.2012. d = Mid(a, 9, 2) \' 16 - should be the day m = Mid(a, 12, 2) \' 09 - month y = Mid(a, 15, 4)
Thats not a correct use of DateValue, replace
DateValue
dt = DateValue(d, m, y) ' Error line dt = DateAdd("d", 1, dt) ' should be 17.09.2012.
with
dt = DateSerial(y, m, d) dt = DateAdd("d", 1, dt)
or
dt = 1 + DateAdd("d", 1, dt)