Question

input value for date field in custom events

  • 23 February 2023
  • 1 reply
  • 195 views

Userlevel 2
Badge +9

Hi All,

 

i am trying to get date field in below format while using in events

 act_finish_        DATE := '&NEW:ACTUAL_FINISH';

 

which is throwing error “literal doesnt match format string”

it works fine when i hardcode the values in below format

actual_finish_     DATE := TRUNC(TO_DATE('25-OCT-23'), 'DDD');

 

can anyone suggest how can i make this work or any documentation related to which format is preferable while accepting the input for dates?

 

Regards,

Rakesh


1 reply

Userlevel 2
Badge +2

I assume here that your are trying to use a date in an event action PL/SQL block.

 

This bit of SQL hopefully explains which formats you should use:

 

SELECT Fnd_Setting_API.Get_Value('EVENT_REG_DATE') event_date_format,
       Fnd_Setting_API.Get_Value('EVENT_REG_DATETIME') event_datetime_format,
       to_date('2022-12-31', Fnd_Setting_API.Get_Value('EVENT_REG_DATE')) test_date,
       to_date('2022-12-31 23.59.59', Fnd_Setting_API.Get_Value('EVENT_REG_DATETIME')) test_datetime
FROM dual;

Reply