select sysdate from dual; -- get the current date and time
select sysdate + 12 from dual; -- get the date and time 12 days in the future
select add_months(sysdate, 12) from dual; -- get the date and time 12 months in the future
I don't think you want to convert this to a char for DBMS_JOBS. Leave it as a date.
Try a few sql statements to see the result then put it into the trigger.
-----Original Message-----
From: johnandsteff
[mailto:oracledba-ezmlmshield-x65764483.[Email address protected]
Sent: Friday, January 28, 2005 2:27 PM
To: LazyDBA Discussion
Subject: date time conversion 12 months out
We're using Oracle Designer to do our design.
We're doing a trigger that that will submit a
DBMS_JOBS for every 12 months.
When I code to_char(name,null,'DD-MON-YYYY:HH:MI:SS' I want to take the sysdate and add 12 (for 12 months). I get an error that's it's invalid type.
Can any one tell how to write a to_char date conversion with 12 months out ?
Thanks.
John DeUnger
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page