+ Reply to Thread
Results 1 to 6 of 6

Split combined date and time data into separate fields

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    Nashville, TN
    MS-Off Ver
    2013
    Posts
    7

    Split combined date and time data into separate fields

    Hi there. I'm an airline pilot and my company just switched the software that tracks our pay. I am creating a new spreadsheet to keep track of my pay. I am importing the data from the new software and then applying our contract pay rules to come up with totals. I have encountered a difficult data field provided by the imported data. It is providing our aircraft IN and OUT times in the following UTC (universal time cooridinate) format:

    2016-01-02T11:30:00.0000000

    Where:

    "2016-01-02" is the date in year-month-day format

    and:

    "T11:30:00.0000000" is the time in hour:minute:second.decimal_seconds format.

    I need a function that will split this data up into separate date and time fields. The date format can remain the same as long as everything after the "T" is eliminated. The time can be simplified to just hours and minutes, as the seconds portion is always zero.

    Any help would be appreciated. Thanks.

    Geoff

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split combined date and time data into separate fields

    Try this one

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Format Custom, yyyy-mm-dd

    or with time:
    v A B
    2 2016-01-02T11:30:00.0000001 2016-01-16 11:30:00

    Custom, yyyy-mm-yy hh:mm:ss


    v A B
    1 2016-01-02T11:30:00.0000000 2016-01-02
    Last edited by AlKey; 01-26-2016 at 05:28 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Split combined date and time data into separate fields

    Welcome to the forum.

    With the imported information in cell A1, use these (in two separate cells) for date and time:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You can format the date and time cells any way you want - they should default to your system settings (probably something like 1/02/16 and 11:30 AM for US settings).

    Hope that helps.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Split combined date and time data into separate fields

    If that "T" is always there, you could try using Text2Columns, with T as the delimiter?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-26-2016
    Location
    Nashville, TN
    MS-Off Ver
    2013
    Posts
    7

    Re: Split combined date and time data into separate fields

    Excellent. All options worked. Aardigspook's idea did exactly what I needed. Thanks all.

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Split combined date and time data into separate fields

    You're welcome. Thanks for the feedback and the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trying to combined data from separate sheets
    By jeck876 in forum Excel General
    Replies: 3
    Last Post: 12-29-2015, 03:38 PM
  2. Separate Date & Time data into 2 different cells
    By edwinkbell in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-28-2014, 09:24 AM
  3. [SOLVED] How do I split the date & time into two separate columns?
    By bananajelly in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-22-2014, 03:26 PM
  4. [SOLVED] Rearranging data from combined list to separate lists
    By VBADoofus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2014, 01:32 PM
  5. Combine data in 3 separate fields into useable date
    By Jannoth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2013, 08:10 AM
  6. Combining separate Date and Time Fields
    By thegreenape in forum Excel General
    Replies: 4
    Last Post: 11-04-2006, 10:44 AM
  7. Replies: 0
    Last Post: 08-28-2005, 10:35 AM

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