pepdwill Honored Contributor.
Honored Contributor.

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?

1 Reply
Established Member.. Utkarsh_Mishra
Established Member..

Re: Workflow Command - Syntax Question

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 Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.