+ Reply to Thread
Results 1 to 6 of 6

Dates

  1. #1
    Registered User
    Join Date
    09-02-2008
    Location
    canada
    Posts
    14

    Dates

    Hello,
    I have a sheet with dates in this format:
    20080910
    1st: I tried to change the date format & tried most of formats but wasn't able to change it to become something like this: 05/22/08.
    Then what I need is to create a formula to calculate how many years till today has passed since that day.
    Could I get help formating that date to a proper one & creating that fomula to calculate the date.

    Thank you,
    Last edited by VBA Noob; 10-28-2008 at 03:32 PM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    To convert to date format

    Select column or range of data with dates
    Data Menu
    Text to Columns
    Delimited
    Remove all Ticks from option boxes
    Next button
    Select Date
    Select format YMD or YDM (not sure what the format is from your posted example)
    Finish Button

    For the calculation habe a look at
    http://www.cpearson.com/excel/datedif.aspx
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    09-02-2008
    Location
    canada
    Posts
    14

    Dates Format

    Thanks for your help, but didn't work as u suggested. But i'm glad to learn this option. Delimited was already selected. & this is how my dates looked:
    20010402
    20070319
    19960619
    20011015

    I need to convert them to this format: mm/dd/yyyy, then I will try the next step & finding the calculation for the date formula you suggested. I hope i'm more clear now.
    I appreciate any help I get.

    Thanks.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    I copied your data, did exactly what mudraker explained, and it worked fine.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    19960619 is obviously 1996 06 19
    therfore do as mudraker says use
    ymd
    you should then see it in the format
    19/06/1996
    to change that to 06/09/1996 custom format cells as mm/dd/yyyy

  6. #6
    Registered User
    Join Date
    09-02-2008
    Location
    canada
    Posts
    14
    Thank you Mudraker very much for all the hep. I tried again & it worked. :

+ 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