Im having a bit of trouble and would really appreciate some help. I have a date field in my form (date.start_time) in which I want to reference in a library and add 5 mins to the time (since its in the lib I am coding this I need to use name_in ). My current code is:
copy(name_in('date.start_datetime')+5/24/60 , 'DATE.END_DATETIME')
However, this seems to be erroring, could anyone help me out please?
Any help greatly appreciated.
You have to use TO_CHAR because NAME_IN and COPY use varchar2 as datatype. There is a application-property BUILTIN_DATE_FORMAT (don't remember the exact name) where you get the format you need to use, it should look similar to
vcDateFormat:=GET_APPLICATION_PROPERTY(BUILTIN_DATE_FORMAT); copy(TO_CHAR(TO_DATE(name_in('date.start_datetime'), vcDateFormat) +5/24/60 , vcDateFormat), 'DATE.END_DATETIME');