DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Days Compute

  1. #1
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    Hi,
    i have a table with date type column.
    how can i compute the days between current date and the date in the table ?
    thanx
    Rotem.

  2. #2
    Join Date
    Jul 2000
    Posts
    296
    Substract the dates:

    SELECT sysdate-date_column
    FROM your_table;

    This gives you difference in days between date_column and sysdate;

    SELECT (sysdate-date_column)*(24*60*60)
    FROM your_table;
    gives you get the difference in seconds.


  3. #3
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    Sorry,
    I ment how do i compute the minutes ???
    Thanx.

  4. #4
    Join Date
    Feb 2001
    Posts
    103
    SELECT sysdate-date_column
    FROM your_table;

    This gives you difference in days between date_column and sysdate;

    SELECT (sysdate-date_column)*(24*60)
    FROM your_table;
    gives you get the difference in minutes
    When the going gets tough, the tough gets going

  5. #5
    Join Date
    Feb 2001
    Posts
    103
    Substract the dates:

    SELECT sysdate-date_column
    FROM your_table;

    This gives you difference in days between date_column and sysdate;

    SELECT (sysdate-date_column)*(24*60)
    FROM your_table;
    gives you get the difference in minutes.
    When the going gets tough, the tough gets going

  6. #6
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    thanx everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width