Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I have this code...
The value in sh.Cells(rw,6) = 45075.7916666667 (May 29, 2023 7:00:00 PM)
The result for variable mm2 after the forumal is executed is 2023-05-29 7:00:00 PM
I am looking for mm2 to be 30 minutes less (2023-05-29 6:30:00 PM), but I'm not getting that result.
VBA Code:
With .cells(rw, 2)
mm2 = DateAdd("n", -0.5, sh.Cells(rw, 6))
.Value = "<" & Format(mm2, "h:mmA/P")
End With
The value in sh.Cells(rw,6) = 45075.7916666667 (May 29, 2023 7:00:00 PM)
The result for variable mm2 after the forumal is executed is 2023-05-29 7:00:00 PM
I am looking for mm2 to be 30 minutes less (2023-05-29 6:30:00 PM), but I'm not getting that result.