Forum Discussion
HurricaneAlaine
Jul 02, 2022Copper Contributor
Date and Time formatting issues
Hello, I am having trouble getting the Date and Time to show correctly in the table view, it is only showing in the formula bar. So, when my macro grabs the data from that cell it looks like 0.2286...
HansVogelaar
Jul 02, 2022MVP
Apply a date format to D6, for example d-mmm-yyy, or whatever you like.
Apply a time format to E6, for example hh:mm:ss.
(Explanation: Excel stores dates and times as numbers, with a unit of 1 day. For example, 6:00 AM is stored as 6/24 = 0.25.
- HurricaneAlaineJul 02, 2022Copper ContributorHow do I do this? This is not something I've had to do before
- HansVogelaarJul 03, 2022MVP
Select D6.
On the Home tab of the ribbon, in the Number group, click on the drop-down arrow in the Number Format box, and select Short Date (or Long Date if you prefer).
Select E6.
This time, select Time from the Number Format drop-down.
Result:
ā