Project and Portfolio Management Practitioners Forum
cancel

Reset date field

SOLVED
Go to solution
Highlighted
RRK_19
Respected Contributor.

Reset date field

Hi,

 

I have a date field with default value. I need to empty that field before it goes to next status.

I used this command in an execution step to do so,

ksc_itg_run_sql QUERY_STRING="select decode(parameter9,'2000-01-01 00:00:00',' ',parameter9)  from kcrt_request_details where request_id='[REQ.REQUEST_ID]' and batch_number=2 "
ksc_store REQD.P.RT_PLAN_IT_DATE = "[SQL_OUTPUT]", "[SQL_OUTPUT]"

 

The problem here is, since i'm using 'space' in order to reset , it is raising date format error(ORA-01841) while trying to use this field for generating reports.

 

Is there any other way to reset the field.

 

P.S i also tried using 'null' instead of 'space', but in the front end null is getting displayed against the field.

 

Thanks in advance.

 

2 REPLIES
Utkarsh_Mishra
Acclaimed Contributor.
Solution

Re: Reset date field

Hi,

 

Instead of using space, you should use NULL... there are many ways to achieve this, but as you are already using command exection step.. then you can try this..

 

In Command condition put

 

'[REQ.<PARAMETER_9_TOKEN>]’ = '2000-01-01 00:00:00'

 

and in command simply put

 

ksc_store REQD.P.AXA_RT_PLAN_IT_DATE = "", ""

 

 

This will achieve you logic... i.e. if parameter9 is 2000-01-01 00:00:00' then only change REQD.P.AXA_RT_PLAN_IT_DATE to NULL/Blank

 

===============================

 

If still the issue is coming then in COndition use this date format

 

to_date('01-01-2008 01:00:01 AM', 'mm-dd-yyyy hh:mi:ss AM')

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
RRK_19
Respected Contributor.

Re: Reset date field

Hi Utkarsh,
I am able to reset the field now without any error.

Thanks you very much for your help.