Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9211689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:21:16+00:00 2026-06-18T01:21:16+00:00

I would like to work out the current time since a date and time

  • 0

I would like to work out the current time since a date and time specified.

If the specified data is : 19/01/2013 16:44:00
and now the time is : 19/01/2013 16:45:00

the difference is 0 years 0 months 0 days 0 hours 1 minute 0 seconds

This can be done easily just by taking the current time and minus the previous time and format it but this is hard to crunch data so what I wish to do is break each date/time segment into its own cell

Let’s say cell A1 has the previous time and cell A2 has the current time

Cells a5 trough f5 would contain 0 years 0 months 0 days 0 hours 1 minute 0 seconds

On a second note on this question is it possible to force the =NOW() to update every x seconds via VBA without interaction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:21:17+00:00Added an answer on June 18, 2026 at 1:21 am

    You can’t use YEAR function to get year difference because that will give 1 year between 31st December 2012 and 1st Jan 2013 when there is only one day…..

    ….similarly you can have problems with MONTH and DAY (e.g. MONTH always returns a number between 1 and 12 whereas in this context you would only expect numbers between 0 and 11)

    Try DATEDIF for the first 3 then HOUR, MINUTE, SECOND as Justin suggests

    Assuming start date/time in A2 and end date/time in B2 try these formulas respectively for Years, Months, Days, Hours, Minutes and Seconds

    =DATEDIF(A2,B2-(MOD(A2,1)>MOD(B2,1)),"y")

    =DATEDIF(A2,B2-(MOD(A2,1)>MOD(B2,1)),"ym")

    =DATEDIF(A2,B2-(MOD(A2,1)>MOD(B2,1)),"md")

    =HOUR(B2-A2)

    =MINUTE(B2-A2)

    =SECOND(B2-A2)

    format all cells as general

    You may get some discrepancies because of variable month/year lengths……

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to work out a number's factorial. My factorial rule is in
I would like to work with internal .xlsx files (styles.xml). I was using <oXygen/>
i would like to work on a website in order to develop other fonctionalities.
I would like to work with very long Strings in Eclipse. So my Problem
I'm trying to make some input fields that I would like to work like
Ideally I would like intellij to work with this but just getting them to
I would like to extend the team explorer work item editor with a custom
I would like to have external proofreaders to work directly inside my Drupal site.
I would like to know how does the login procedure work in the Internet
I would like to understand how Etherpad's timeline feature work. If you don't know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.