+ Reply to Thread
Results 1 to 4 of 4

Date function with 5 and 6 digit dates - changing to 1900's - SOLVED

  1. #1
    Registered User
    Join Date
    05-12-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Date function with 5 and 6 digit dates - changing to 1900's - SOLVED

    Hi Guys.

    I have recently started receiving files containing a large amount of information. These files come in .txt format and it is up to me to seperate the data out

    The part I am having difficulty with is the date. It is included in a long string of data that I seperate out using text to columns. All good there.

    If the date is 1st to the 9th of the month it comes out as for example 71014 If the date is double digit days then it comes out as 241014

    I am unable to convert this to a date using the format cell option, it comes out badly. I have used the date function =DATE(RIGHT(C5,2), MID(C5, 3,2), LEFT(C5,2))

    This works in a way until I get to the year, there it forces the year as 19. so a date of 24/10/2014 shows as 24/10/1914

    For the 5 digit dates I have formatted to custom and put in 6 zeroes to force it to be a 6 digit date, this has not gone according to plan for example

    Original 40812
    formatted to 040812
    Date function displays: 10/10/1918

    Any suggestions on this?

    Thanks
    Last edited by thmsnmg; 11-13-2017 at 08:52 AM. Reason: Solved

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Date function with 5 and 6 digit dates - changing to 1900's

    Hi,

    Assuming you have typical UK regional settings, this should suffice I think
    =TEXT(C5,"00-00-00")+0
    then format the cell as a Date.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    05-12-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Re: Date function with 5 and 6 digit dates - changing to 1900's

    You sir are a scholar and a gentleman.

    This worked perfectly.

    Thank you

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Date function with 5 and 6 digit dates - changing to 1900's - SOLVED

    You're welcome.

+ 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] How to hide date 01/10/1900 for calculating dates
    By rhett7660 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-01-2017, 10:21 AM
  2. [SOLVED] Min date function, excluding default date of 1900
    By asperf21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2017, 05:06 PM
  3. Macro for changing the date from 02-Jan-1900 to 01-Jan-1900
    By Lavanya Anandan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 07:08 AM
  4. [SOLVED] 1900 year date when filter column of dates
    By rz6657 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2013, 12:18 PM
  5. Excel 2007 : changing a defualt date (00/00/1900) to a blank
    By Icehockey44 in forum Excel General
    Replies: 9
    Last Post: 03-08-2012, 11:24 AM
  6. MOd function of a pre 1900 date
    By Martindelica in forum Excel General
    Replies: 0
    Last Post: 04-18-2007, 09:28 AM
  7. [SOLVED] Date functions for dates pre-1900
    By Stephen Larivee in forum Excel General
    Replies: 2
    Last Post: 07-20-2005, 04:05 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