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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:23:49+00:00 2026-05-26T01:23:49+00:00

i have a table with two columns first column is a (currentdate)timestamp and the

  • 0

i have a table with two columns first column is a (currentdate)timestamp and the other one is a (dateReturn)datetime column.i i need to get the difference between currentdate and dateReturn from number of days.is this possible?

  • 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-05-26T01:23:50+00:00Added an answer on May 26, 2026 at 1:23 am

    No, this is not possible.

    Contrary to popular belief (and the name itself), a timestamp column is not actually related to time.

    Disclaimer: This answer is specific to Sql Server (as per the tags of the question), other database engines might have different implementations here.*

    Instead it is a 64-bit number that steadily increases. The value of the number is shared between all tables in a single database that has such a timestamp column. In other words, if you have two such tables, modify a row in one, and modify a row in the other, the value of the timestamp in the first table would be X, and in the second table would be X+1.

    as per the documentation of timestamp:

    Each database has a counter that is incremented for each insert or update operation that is performed on a table that contains a timestamp column within the database. This counter is the database timestamp. This tracks a relative time within a database, not an actual time that can be associated with a clock.

    As such, the value is not related to the actual date and/or time the row was inserted or last modified, and can not be converted to such a date/time in any way.

    The only purpose of a timestamp column is to have something unique, that is guaranteed to be increasing. Since the value is 64 bit, you will have access to 18 446 744 073 709 551 616 operations which require a timestamp column before the value resets. If you have a database that can handle a million such operations every second, you will still have to wait around 584 554 years before the value resets, so I would say it meets the uniqueness requirements.

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

Sidebar

Related Questions

I want to have one table with two TIMESTAMP columns. One column to keep
I need a table which has two columns: First column have an ID Second
I have two integer columns in a table where the first column is populated
I have created a table with two columns. The first column contains the hyperlinks,
I have a HTML table where each row has two columns. First column is
I have created an HTML table with two columns. I want the first column
Suppose I have two columns in a table that represents a graph, the first
I have a table with two columns and one row, and 100% width across
I have a table with two columns: column A column B 1 2 1
Say I have an MSSQL table with two columns: an int ID column that's

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.