+ Reply to Thread
Results 1 to 8 of 8

subtract dates in Excel, but one is not in date format.

  1. #1
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75

    Question subtract dates in Excel, but one is not in date format.

    I have a Lotus Notes database that exports the dates shown as 070104 (yymmdd) but as text. I need to calculate how many days the project is overdue by subtracting the date that is exported from today's date. Is there a way this can be done with this format? Currently I have another column set up in Excel where I manually change the date to 01/04/07 and the next column formula subtracts this date from today's date to give me the number of days past this goal date the project is open.

    I am running Excel 2000

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    Hi,

    =VALUE(RIGHT(A1,2)&"/"&MID(A1,3,2)&"/"&LEFT(A1,2))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =TODAY()-DATE("200"&LEFT(A1),MID(A1,2,2),RIGHT(A1,2))

    where A1 houses your Lotus date.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Or this,

    =TODAY()-VALUE(RIGHT(A1,2)&"/"&MID(A1,3,2)&"/"&LEFT(A1,2)) format cell to Number
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75
    I tried both suggestions. The first one returns #Value! in the cell and the second on returns #Num! in the cell.

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    In all cases you must change the cell reference in the formula to the cell in your worksheet

  7. #7
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75
    I did that also. When I click on the = mark beside the address window. The result is showing in the window correctly, but in the cell it is not showing the same results.

  8. #8
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75
    I think my problem has something to do with the way that Lotus Notes exports the information. I tried both formulas in another Excel workbook and they worked.

    I tried formatting the Lotus Notes export information and can not get the formulas to work in it.

    Thanks for the info though. I just have to find how to make it work with the export.

+ 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