double date conversion when adding partition I want to create a procedure that adds new partition in a table partitioned by time. For this purpose I use following commands:

    s_until := to_char(sysdate+1,' SYYYY-MM-DD HH24:MI:SS');
    s_statement := 'ALTER TABLE '||s_table||' ADD PARTITION '||s_partition||' VALUES LESS THAN 
    (TO_DATE('''||s_until||''', ''SYYYY-MM-DD HH24:MI:SS'', ''NLS_CALENDAR=GREGORIAN'')) 
    TABLESPACE '||s_tablespace;
    execute immediate s_statement;


As you see I perform unnecessary conversions of date. 
Does anybody know how skip this dirty hack?
Performing this way without conversion gives and ORA error.

    s_statement := 'ALTER TABLE '||s_table||' ADD PARTITION '||s_partition||' VALUES LESS THAN 
    (sysdate+1) TABLESPACE '||s_tablespace;
    execute immediate s_statement;
There is no way around it in Oracle 9i.  

If you were using 11g, you could define the table to be interval partitioned in order to avoid having to create a new partition every day.  But that's not going to help you on an ancient version of Oracle.