Results 1 to 4 of 4
  1. #1
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283

    percentage of way through lease

    having another brain cramp.

    If I have 2 date fields LEASE_START_DATE and LEASE_EXPIRY_DATE how can I find the percentage of the way through the lease

    I know in excel the following works - =IF(C3="","",(DATEDIF(C3,TODAY(),"d")+1)/(DATEDIF(C3,D3,"d")+1)) - where C3 is Start and D3 is End Date



    Some of the fields are blank.

    examples
    LEASE START DATE LEASE END DATE % Way Through Contract
    2014-12-30 2019-12-29 127%
    2016-06-16 2021-06-15 98%
    2016-07-28 2022-01-27 87%
    2016-06-29 2021-12-28 88%
    2016-10-13 2022-04-12 83%
    2016-12-14 2021-12-13 88%

    Thanks for the help as always

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Q1 get the basics
    TotDays =Datediff("d",[LEASE_START_DATE],[LEASE_EXPIRY_DATE])
    UsedDays = Datediff("d",[LEASE_START_DATE],Date())


    Q2:
    then do the math: UsedDays / TotDays


  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    You've posted in programming, so post the relevant code if you get stuck because you'll also have to allow for the divisor being zero. Null fields will likely raise an error about division by zero.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283
    Quote Originally Posted by ranman256 View Post
    q1 get the basics
    totdays =datediff("d",[lease_start_date],[lease_expiry_date])
    useddays = datediff("d",[lease_start_date],date())


    q2:
    Then do the math: Useddays / totdays

    that worked. Thank you so much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. percentage
    By angie in forum Forms
    Replies: 1
    Last Post: 08-13-2017, 02:11 PM
  2. Getting percentage report
    By reynier09 in forum Access
    Replies: 7
    Last Post: 07-15-2016, 07:34 PM
  3. Percentage
    By azhar2006 in forum Queries
    Replies: 3
    Last Post: 11-15-2014, 02:22 PM
  4. Return a Percentage
    By alecmat in forum Access
    Replies: 3
    Last Post: 08-07-2013, 08:06 PM
  5. percentage in a query
    By Peljo in forum Access
    Replies: 2
    Last Post: 02-27-2008, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums