+ Reply to Thread
Results 1 to 6 of 6

Date & Time Cells to Be Splitted

  1. #1
    Registered User
    Join Date
    11-02-2006
    Location
    Pakistan
    Posts
    33

    Date & Time Cells to Be Splitted

    Hi All !

    Can anybody helps me to split date/time into two cells. For example,

    In Cell A1 the value is "03/03/2009 13:56:00". I want to split date in cell B2 & Time in cell C2.

    Currently this value in A1 is showing the format general. I changed it to date/time or even in time function but I do not know any formula currently to split this as per my requirement.

    Needs urgent help.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Date & Time Cells to Be Splitted

    I know these two formulas work, but we see a lot of instances when people say their data is one thing, but it's not. So, if the value in cell A2 is REALLY a complete set of date and time stamp data, the formula to extract each piece is:

    Date: =INT(A2) (format the cell as Date: preferred format)
    Time: =A2-INT(A2) (format the cell as Time: 13:30)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Date & Time Cells to Be Splitted

    If the data in cell A2 is actually NOT a time stamp but "text" with the exact appearance you noted

    "03/03/2009 13:56:00"

    ...quotes and all, then these two alternate formula will still pull the text out and convert it to actual date/time info.

    B2 =DATEVALUE(MID(A3,2,10)) (format the cell as Date: preferred format)
    C2 =TIMEVALUE(LEFT(RIGHT(A3,LEN(A3)-FIND(":",A3)+3),8)) (format the cell as Time: 13:30)

  4. #4
    Registered User
    Join Date
    11-02-2006
    Location
    Pakistan
    Posts
    33

    Re: Date & Time Cells to Be Splitted

    Thanks !

    Problem solved

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Date & Time Cells to Be Splitted

    Which set of formula ended up being your solution?

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date & Time Cells to Be Splitted

    Just as a sideshow... you can also extract TIME from DATETIME using

    =MOD(A2,1)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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