+ Reply to Thread
Results 1 to 7 of 7

Re-organize date and units into different formats

  1. #1
    Registered User
    Join Date
    03-21-2005
    Posts
    12

    Re-organize date and units into different formats

    Hi I hope you can help me with this.

    I have approximetly 6000 rows of data extracted from a power meter that I have pasted into two columns of a 2010 excel spreadsheet.

    Unfortunately the date, time, and unit formats do not meet the standard that I need to report to our customer.

    In Column A the pasted date and time is formatted as: 27.01.2012 11:11:33

    Is it possible using a worksheet function or VBA code to reformat the entire column's date and time to: 01/27/12 11:11:33?

    Also in Column B the pasted row units for amerage is: 15,69

    I would like to replace the comma with a period for 15.69.

    I appreciate any help you can give me. I can navigate my way around excel, I just need a hint to get me on my way.

    Thanks.

    Will

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Re-organize date and units into different formats

    Try UDF. It is more flexible

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-21-2005
    Posts
    12

    Re: Re-organize date and units into different formats

    Perfect, thank you very much!

  4. #4
    Registered User
    Join Date
    03-21-2005
    Posts
    12

    Re: Re-organize date and units into different formats

    I didn't close enough at the result. The days and months get crossed until the 12th. See below for examples

    1/31/12 11:56 PM
    1/2/12 12:11 AM (this should be 2/1/12)

    12/2/12 11:56 PM (This is suppose to be 2/12/12)
    2/13/12 12:11 AM

    Thank you

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Re-organize date and units into different formats

    It is your formatting issue. Go to Format > Custom and enter d/m/yyyy hh:mm:ss

  6. #6
    Registered User
    Join Date
    03-21-2005
    Posts
    12

    Re: Re-organize date and units into different formats

    Thanks but I must be missing something. I tried changing date format but excel thinks the result of your function is correct as January 2nd 2012 instead of February 1st 2012.

    It is not that bad to manually fix. Thank you for your help

  7. #7
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Re-organize date and units into different formats

    Maybe isntead of "mm/dd/yyyy" maybe try dd/mm/yyyy

    ConvertDate = Format(Replace(rDate, ".", "/"), "mm/dd/yyyy hh:MM:ss")

+ 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