+ Reply to Thread
Results 1 to 5 of 5

Conversion of dates/times

  1. #1
    Registered User
    Join Date
    05-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    2

    Conversion of dates/times

    Hello Forum,

    I have a long column of dates/times, each in the following text format:
    Thu Nov 24 19:07:01 GMT+00:00 2011

    I wish to create a new column that provides each in the following text format:
    24/11/2011 19:07

    Can someone help with an appropriate method/formula please?

    Many thanks,
    Des

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: Conversion of dates/times

    Assuming every cell has the same format, I would use MID to extract the year, month, day, hours and minutes and DATE + TIME to get the date/time in a cell and then format it as required.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: Conversion of dates/times

    Something like this:

    Only question is how would you write 1.11.2011:

    Thu Nov 1 19:07:01 GMT+00:00 2011
    Thu Nov 01 19:07:01 GMT+00:00 2011

    Solution will work for 2nd one.
    Attached Files Attached Files
    Never use Merged Cells in Excel

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Conversion of dates/times

    Possibly

    =TEXT(DATEVALUE(TRIM(MID(A2,5,6))&", "&RIGHT(A2,4)),"dd/mm/yyyy")&" "&TEXT(TIMEVALUE(TRIM(MID(A2,11,9))),"hh:mm")

    should work for either way

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698

    Re: Conversion of dates/times

    That doesn't seem to work with UK regional settings, Cutter - I suggest this formula

    =REPLACE(MID(A2,9,11),3,0,"-"&MID(A2,5,3)&"-"&RIGHT(A2,4)&" ")+0

    that works with UK or US regional settings and should also work with 02 Nov or 2 Nov

    format result cell any way you want, in your case dd/mm/yyyy hh:mm
    Audere est facere

+ 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