![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 03 Jan 2006 @ 21:10:07 GMT
Partho,
select
((case
when cast('31-dec-2005' as date format 'dd-mmm-yyyy')-date > 0
then
date
else
cast('31-dec-2005' as date format 'dd-mmm-yyyy')
end )-due_date)
This should help to get the least but, arthmetica opperation on date will always lead to integer value so no need to use a ceil fucntion. in case you are using timestamp, you need to add
( (above) + .999999999 ) as integer).
Hope this works for you.. Thanks, Gopi
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||