Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: cavagnaro on July 21, 2018, 07:02:27 PM

Title: OCS HTTP - AddRecord with DateTime field
Post by: cavagnaro on July 21, 2018, 07:02:27 PM
Hi guys
Any of you have achieved to do AddRecord via HTTP on OCS and add a custom field with date time?
I can do the date part by sending it as "dd/mm/yyyy" but if I send the "dd/mm/yyyy hh:mm:ss" it doesn't work, and in this case Oracle complains...
Then tried to do TO_DATE() function, but even OCS accepted it, it never sent over to Oracle, the field was not sent in request.


Any idea?
Title: Re: OCS HTTP - AddRecord with DateTime field
Post by: vmc on July 21, 2018, 11:02:22 PM
What's the oracle error and what is the column type in the schema?

Sent from my Redmi Note 3 using Tapatalk

Title: Re: OCS HTTP - AddRecord with DateTime field
Post by: cavagnaro on July 21, 2018, 11:43:01 PM

If for example I add:'DATE_AC' '16/07/2018 13:30:00'


Then Oracle returns:


'GSW_ERROR' 'ORA-01830: date format picture ends before converting entire input string'


I have tried many date formats.
The field at CME is defined as datetime.


At the DB the field is a Date type

Title: Re: OCS HTTP - AddRecord with DateTime field
Post by: hsujdik on July 22, 2018, 05:41:18 PM
Try this:

On the DBServer host that OCS uses to connect to the Oracle Database, set the environment variable NLS_DATE_FORMAT=dd/mm/yyyy hh24:mi:ss

A restart of  DBServer would be required.



Enviado do meu iPhone usando Tapatalk
Title: Re: OCS HTTP - AddRecord with DateTime field
Post by: cavagnaro on July 22, 2018, 06:08:01 PM
Yeah that is my next idea on my list but I am kinda doubtful on which impact would it have on the PRD environment.