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 9143377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:00:33+00:00 2026-06-17T10:00:33+00:00

If you have an old UNIX timestamp in JavaScript… is there a way I

  • 0

If you have an old UNIX timestamp in JavaScript… is there a way I can get the number of the age of that timestamp?

Like, the age of how old that unix timestamp is from when it is… to now.

Can you do that in JavaScript?

  • 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-17T10:00:35+00:00Added an answer on June 17, 2026 at 10:00 am

    Assuming your timestamp is in milliseconds, you can get the the age in milliseconds using:

    (new Date()).getTime() - timestamp;
    

    If your timestamp is in seconds, multiply it by 1000 before subtracting.

    You can then divide by the appropriate factor to convert to seconds/minutes/hours etc. For example, to get the age in years, you would use:

    ((new Date()).getTime() - timestamp) / (1000 * 60 * 60 * 24 * 365);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have old code that uses size_t which IIRC comes from cstring.h. On OS
I have inherited a 20-year-old interactive command-line unix application that is no longer supported
I have an old C project that compiles just fine in Unix. I want
I have several old 3.5in floppy disks that I would like to backup. My
I have old text inside a div. I want that text to fly out
I have refereed old questions and found that people face many issues after installing
I have this old question but no answer works for me from online, the
I have an old skin that I need to adapt to the new MediaWiki
I have an old iOS app that I never distributed and am now trying
Is there any way to access the number of blocks allocated to a file

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.