Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I've included an image of times and their text counterparts. What code could I use to isolate just the time? It would have to be the 24 hour clock with no colon and include zeros in front of the number such as 0005, 0325 etc. I tried something like (see below) just to experiment, and it left me with 0000 for each item. This is for sheet “72 Hr” and Column D. Thank you!
VBA Code:
VBA Code:
VBA Code:
Sub TIME()
Range("D13") = Format(Date, "HHMM")
End Sub