+ Reply to Thread
Results 1 to 5 of 5

Convert text in multiple columns to real date and time

  1. #1
    Registered User
    Join Date
    10-06-2014
    Location
    Houston, Texas
    MS-Off Ver
    2010
    Posts
    2

    Convert text in multiple columns to real date and time

    I have the following columns and data in Excel 2010. Here are the first few of the 3000+ rows:
    Please Login or Register  to view this content.
    I have been hacking away at this for 2 hours with no luck. I need to convert this data into a legitimate date and time format in a single cell, so I can use it in a Pivot Table.

    How do I accomplish this seemingly simple procedure? I am confused by how the cells should be formatted, and the use of various functions like concatenate, date, dateformat, and text. It's not clear what should be set to what. I can get the numbers into a single cell using concatenate, but Excel doesn't seem to treat the numbers is a real date and time.

    Also, I need to do the same thing but with no time; just the date.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Convert text in multiple columns to real date and time

    Hi,

    This works for me (UK dates)

    =DATEVALUE(B2&"/"&A2&"/"&C2)+D2

    I guess this should work for you..

    =DATEVALUE(A2&"/"&B2&"/"&C2)+D2

    omit the +D2 for date only
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    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: Convert text in multiple columns to real date and time

    try this

    =DATE(C2,MONTH(B2&A2),B2)+D2

    A
    B
    C
    D
    E
    1
    Month Day Year Time Format Custom: m/d/yyyy h:mm:ss
    2
    Aug
    1
    2014
    0:30:39
    8/1/2014 0:30:39
    3
    Aug
    1
    2014
    1:00:36
    8/1/2014 1:00:36
    4
    Aug
    1
    2014
    1:45:06
    8/1/2014 1:45:06
    5
    Aug
    1
    2014
    2:00:37
    8/1/2014 2:00:37
    6
    Aug
    1
    2014
    3:00:38
    8/1/2014 3:00:38
    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

  4. #4
    Registered User
    Join Date
    10-06-2014
    Location
    Houston, Texas
    MS-Off Ver
    2010
    Posts
    2

    Re: Convert text in multiple columns to real date and time

    Thanks to everyone for the help. This gives me the dreaded #VALUE! error:

    =DATEVALUE(A2&"/"&B2&"/"&C2)+D2

    This one worked fine:

    =DATE(C2,MONTH(B2&A2),B2)+D2

    In both cases, the cell format was set to "Date" with a "type" of "3/14/01 1:30 PM"

    Thanks again! I will have to save this spreadsheet as the formula will certainly come in handy in the future.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Convert text in multiple columns to real date and time

    Quote Originally Posted by AlKey View Post
    try this

    =DATE(C2,MONTH(B2&A2),B2)+D2
    OK. It worked at my end. So how does appending the month reference to the day reference coerce the month number? I've never seen this one before? Should I start a new thread?

    Just trying to learn.

+ 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. Macro to automatically convert prt scr image-based text to real text in cell
    By jasonfromchico in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 02:27 PM
  2. How to convert a real time
    By redza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2013, 05:05 AM
  3. Replies: 3
    Last Post: 04-04-2012, 03:42 PM
  4. Help: How do I convert a text date into a real date format
    By japorms in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2006, 01:36 PM
  5. Convert real time to a % in Excel
    By Barry in forum Excel General
    Replies: 1
    Last Post: 08-01-2006, 05:30 AM

Tags for this Thread

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