+ Reply to Thread
Results 1 to 2 of 2

Splitting Date & Time into two seperate columns

  1. #1
    Forum Contributor mccrimmon's Avatar
    Join Date
    MS-Off Ver

    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?

    Many thanks

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    Melbourne, Australia
    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 Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1