How to change value of hours and seconds in the same date string?
Posted on 2016-10-27
I have a vba dateString variable in "longTime format" that is uncorrected for daylight saving,
I must adjust the hours value by -1, and then I need to adjust the seconds value by -1
Dim strDate As String
Dim dtDate As Date
The model of my string date:
strDate = Format(Time, "Log Time")n
I can change the hour parameter in that date
dtDate = DateAdd("h", -1, strDate)
or the second parameter
dtDate = DateAdd("s", -1, strDate)
But how do I change BOTH parameters in the same date?
("s", -1, strDate) and ("h", -1, strDate)