Till New Year
Thursday, 2 July, 2009
Baur
SELECT 'Till the New Year ' ||
to_char(extract(YEAR FROM SYSDATE) + 1) || ' - ' ||
trunc(months_between(to_date('01.01.' ||
to_char(extract(YEAR FROM SYSDATE) + 1), 'dd.mm.yyyy'), SYSDATE))
|| ' months ' ||
to_char(LAST_DAY(SYSDATE) - SYSDATE) || ' day ' ||
to_char(23 - to_number(substr(to_char(SYSDATE, 'hh24:mi:ss'), 1, 2)))
|| ' hh ' ||
to_char(59 - to_number(substr(to_char(SYSDATE, 'hh24:mi:ss'), 4, 2)))
|| ' mi ' ||
to_char(59 - to_number(substr(to_char(SYSDATE, 'hh24:mi:ss'), 7, 2)))
|| ' ss ' || '[today:' ||
to_char(SYSDATE, 'mm:dd:yyyy hh24:mi:ss') || ']' AS "Happy New Year!!!"
FROM dual;
Like this:
Be the first to like this post.
Recent Comments