+ Reply to Thread
Results 1 to 7 of 7

Calculator to calculate year, months and days

  1. #1
    Forum Contributor
    Join Date
    01-23-2020
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    113

    Calculator to calculate year, months and days

    Good day

    i have this excellent calculator that when you type in a date and press the calculate button, it shows in a label how many years, months and days it is until today.

    the problem is i also want the user to input the date on a stamp and a manual date to calculate the years, months and days in a separate label.

    Example

    you have a office that checks the validity of a document and that documents must no be older than 6months.

    if you want to verify that the date on the document and the date the person was there, you should be able to.

    please help
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Calculator to calculate year, months and days

    Hi there,

    Maybe my birthday occurred on a "special" date, but:

    when I enter a value of 22/10/2000, the output is "21 year(s), 11 month(s), 24 day(s)

    when I enter a value of 22/11/2000, the output is "19 year(s), 10 month(s), 24 day(s)

    I haven't investigated the calculations yet, but there's obviously something wrong!

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    01-23-2020
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    113

    Re: Calculator to calculate year, months and days

    sorry for that. my computer date is set to dd/mm/yyyy but i use yyyy/mm/dd on the calculator.

    dont worry about that. what happens is when u type the date on a document, it will calculate the years, months and days until today. that is fine.

    i want when you as a supervisor like VERIFY afterwards the years, months and days from the date of the document to the date that the person came to your office.

    thats why i created two seperate textboxes and a label.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculator to calculate year, months and days

    Try This code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Forum Contributor
    Join Date
    01-23-2020
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    113

    Re: Calculator to calculate year, months and days

    ok thank you. if you type in the date that is on the document eg 13/01/2020 it shows 9months and 2 days. That is correct because it calculated from that date until today. Computer date and time.

    i want two separate textboxes on the same userform where u type in the date of the document eg 13/01/2020 until any date that u can manually put it.

    Scenario. the policy at your company is that when someone brings a certain document. the person working at the counter must verify if that document is still valid. lets say 4 months.

    u are the supervisor so when u check that "transaction" after a week or a month, u would like to confirm whether that document was indeed valid. so u type in the date of the stamp of the document and the date the client came to your company.

    two separate textboxes with a command button where the new result shows in another label.

    Thank you for your time in helping me. I thank you for it

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculator to calculate year, months and days

    Type a date in the first textbox. What Happens? Days since that day and today is displayed. Right?


    Type a date in the second text box what happens? days between the two dates is displayed. Right?


    Now click on the first text box again . What Happens? The second textbox is cleared and Days since that day and today is displayed. Right?

    So where is your problem?

  7. #7
    Forum Contributor
    Join Date
    01-23-2020
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    113

    Re: Calculator to calculate year, months and days

    thank you it works like a charm! you are truly a Forum Guru.

+ 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] Formula to calculate working days and calendar days per month-year ?
    By donny007 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2018, 06:23 PM
  2. Calculate Date from Year. Months and Days (Forward and Backward both)
    By Premmadaan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2017, 05:45 AM
  3. [SOLVED] calculate total number of days between two days based on 365 days year
    By aparunkumar in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-14-2016, 12:51 AM
  4. Replies: 4
    Last Post: 11-28-2011, 06:21 AM
  5. Replies: 3
    Last Post: 03-12-2009, 09:54 AM
  6. Days into Months/Year
    By easycapital in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2008, 06:59 PM
  7. i have two days and i want the difference in days, months, year
    By maja in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-21-2006, 08:14 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