java.sql.SQLDataException: ORA-01843: not a valid month ORA-06512: at line 1

Hi All,

I am getting the following error when I am trying to insert into Oracle data base from Stored procedure. from Appian can we send date and time to SP ? because in oracle DB they are not storing timestamp with included GMT but Appian will send timestamp including GMT.  

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    You have 2 options to resolve this issue:

    1. You'll need to split the data into 2 columns, one a datetime, and the other holding the timezone information. And pass the first part in string format to stored procedure where stored procedure will convert this varchar2 data into timestamp format using TO_TIMESTAMP() function of Oracle.

    2. Pass Appian function now() result in the form of string/varchar2 as an input to the stored procedure where your procedure need to convert this back into timestamp format using TO_TIMESTAMP() function where you need to mention your timestamp in varchar2 format as it's first parameter and the format of timestamp as it's 2nd parameter

    Hope this will help you
  • 0
    Certified Lead Developer
    You have 2 options to resolve this issue:

    1. You'll need to split the data into 2 columns, one a datetime, and the other holding the timezone information. And pass the first part in string format to stored procedure where stored procedure will convert this varchar2 data into timestamp format using TO_TIMESTAMP() function of Oracle.

    2. Pass Appian function now() result in the form of string/varchar2 as an input to the stored procedure where your procedure need to convert this back into timestamp format using TO_TIMESTAMP() function where you need to mention your timestamp in varchar2 format as it's first parameter and the format of timestamp as it's 2nd parameter

    Hope this will help you
  • 0
    Certified Lead Developer
    You can use the function INSERT INTO test_table(date_col) VALUES (to_date('21/01/2017','DD/MM/YYYY')) for the all the data you need to insert if the design cannot be changed and you have finite data.