+ Reply to Thread
Results 1 to 4 of 4

date formating

  1. #1
    Registered User
    Join Date
    06-09-2017
    Location
    germany
    MS-Off Ver
    2010
    Posts
    23

    date formating

    hello all,

    i have a file that i get from a database that has multiple date fields and each date is in a different format for example one format is

    20180601 which translates to 01.06.2018
    and another format is
    27/12/20170 with an extra "0" at the end of the year

    is there a formula or something that can change those into DD/MM/YYYY format ?

    thanks in advance

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

    Re: date formating

    It would help if you attached a sample Excel workbook, so we can see the range of formats that you encounter..

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Please note that the Paperclip icon (Attachments button) does not work on this forum, so don't try to use that.

    Hope this helps.

    Pete

  3. #3
    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
    44,628

    Re: date formating

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied down
    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


  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: date formating

    OR CAN TRY
    =IF(LEN(A1)=8,TEXT(A1,"####\/##\/##"),LEFT(A1,10))+0
    Change the cell format to date
    OR
    =TEXT(IF(LEN(A1)=8,TEXT(A1,"####\/##\/##"),LEFT(A1,10)),"DD/MM/YYYYY")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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. Date formating
    By keith jafrato in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-07-2014, 12:08 PM
  2. Date Formating
    By britinva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2013, 04:04 PM
  3. [SOLVED] Date Formating
    By thong127 in forum Excel General
    Replies: 4
    Last Post: 03-18-2013, 04:38 PM
  4. Conditional Formating of cells based on today's date, and another date
    By dviolante10 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2012, 02:32 PM
  5. Replies: 6
    Last Post: 01-17-2011, 10:34 AM
  6. Date Formating...
    By CharterJP in forum Excel General
    Replies: 1
    Last Post: 11-19-2010, 10:09 PM
  7. Date Formating
    By HammerTime in forum Excel General
    Replies: 3
    Last Post: 08-21-2008, 08:19 PM

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