-
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.
-
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.
-
Sorry,
I ment how do i compute the minutes ???
Thanx.
-
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
-
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
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|