+ Reply to Thread
Results 1 to 5 of 5

Date / Time formatting

  1. #1
    Registered User
    Join Date
    06-02-2017
    Location
    Newbury
    MS-Off Ver
    2010
    Posts
    50

    Date / Time formatting

    Hello,

    I'm exporting data from SAP which annoyingly has the date format as yyyymmddhhmmss and displayed as a number.

    I've tried all different formats listed in Excel and it always returns ##############. I edited a single cell and manually inputted the relevant slashes and colons so that it was displayed yyyy/mm/dd hh:mm:ss which worked but then when I tried dragging it down to format the other cells, they change to ############.

    All I really need is the date, I'm not fussed about the time. Any help will be greatly appreciated. I've attached an example spreadsheet.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Date / Time formatting

    Try this in B1 and format -> yyyy/mm/dd hh:mm:ss

    =--TEXT(A1,"0000\/00\/00 00\:00\:00")

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Date / Time formatting

    Put this formula in B1:

    =DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))

    then copy down as required.

    Hope this helps.

    Pete

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Date / Time formatting

    here are two options...
    =LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)
    or
    =DATEVALUE(LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)) and format as date.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Date / Time formatting

    Thanks for the rep, glomb.

    Pete

+ 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. [SOLVED] Conditional Formatting with Date/Time with Date/Time of another cell
    By jnepsa in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-20-2017, 10:48 AM
  2. Time and Date Value Formatting
    By MikeRoot in forum Excel General
    Replies: 1
    Last Post: 01-12-2015, 07:25 AM
  3. formatting of date and time
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2014, 03:25 AM
  4. date and time formatting
    By eturn in forum Excel General
    Replies: 7
    Last Post: 01-26-2011, 07:04 PM
  5. Date and time formatting
    By Mayank Trivedi in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-10-2008, 03:01 PM
  6. Date and Time formatting
    By aknapp in forum Excel General
    Replies: 1
    Last Post: 07-06-2007, 01:18 AM
  7. Date and Time Formatting
    By brook1 in forum Excel General
    Replies: 2
    Last Post: 10-23-2006, 09:25 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