Hi Excel MVP Team,
Please note I am trying to add 2 hours for the current time keeping the minutes and second for the original time since I need to add a time stamp.
Result was 5/11/2022 10:48:37 AM
Result required : 5/11/2022 12:48:37 AM (Current Time +2 hours)
Appreciate your help as soon as possible since I checked many pages and I cannot find a solution.
Thank in advance'
Andres
Please note I am trying to add 2 hours for the current time keeping the minutes and second for the original time since I need to add a time stamp.
VBA Code:
Sub ChangeDateToTime()
'Track date of the Modified Date
Application.ScreenUpdating = False
With Sheets("TrackDate")
Y = Time
.Visible = True
.Range("D2").Value = Date & " " & Y
.Visible = xlSheetVeryHidden
Debug.Print Date & " " & Y
End With
End Sub
Result was 5/11/2022 10:48:37 AM
Result required : 5/11/2022 12:48:37 AM (Current Time +2 hours)
Appreciate your help as soon as possible since I checked many pages and I cannot find a solution.
Thank in advance'
Andres