Splitting Date & Time into two seperate columns
I am looking for some help please.
I am trying to use the Text To Columns function within my VBA code, however, when trying to split a date and time in the following format: 28/04/2008 13:59:10 it is displaying my time as 03:59:10 with PM in text in the next again cell.
Is there anyway that I can have it so that it only displays my date in one cell and then the correct 24 hour time in the next cell?
Using text to columns
Fixed width > Next
Double click on the black line between Time & PM - This will remove the line & stop the entry being split into 3 columns.
Remember unless the cell entry is text the underlying date/time is a number and the cells formatting is changed to display the data in the required format without changing the underlying value
The date of 28/04/2008 13:59:10 has a numeric value of 39566.5827546296 where the decimal part of the number is the time and the whole number part is the date
The column with the date may still display an 0:00 time
Please Read Forum Rules
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post
Top Excel links
for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assisted or failed to assist you I welcome your Feedback.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1