Workflow Command - Syntax Question (213 Views)
Super Advisor
Posts: 256
Registered: ‎07-12-2012
Message 1 of 2 (213 Views)

Workflow Command - Syntax Question

Hopefully this is a quick answer for somebody.


Am trying to set a field in a workflow command, but having issues with the syntax.


ksc_store REQD.P.P_DATEFIELD = to_char('[SYS.DATE]','YYYY-MM-DD HH24:MI:SS')


Can anyone point out what I'm doing wrong?

Honored Contributor
Posts: 743
Registered: ‎07-13-2010
Message 2 of 2 (196 Views)

Re: Workflow Command - Syntax Question

[ Edited ]

You are using incorrect synatx in the command, as "to_char" is Oracle function and it does not work this way, this is not the right way to do it. Probaly if you want to store the current time and date then you can use this




[SYS.TIME_STAMP] - Date format is 'MM-DD-YYYY HH24:MI:SS'





If you still want to use date in other format then use this in the command:


ksc_itg_run_sql QUERY_STRING="select to_char('sysdate','YYYY-MM-DD HH24:MI:SS')from dual"
ksc_set P_VALUE="[SQL_OUTPUT]"
ksc_itg_run_sql QUERY_STRING="select to_char('sysdate','YYYY-MM-DD HH24:MI:SS')from dual"

ksc_set VP_VALUE ="[SQL_OUTPUT]"
ksc_store REQD.P.P_DATEFIELD = "[P_VALUE]" ,"[VP_VALUE ]"

Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.