Question on catalog task

Mani60
Tera Contributor

Hi All,

The catalog item has a date and time field. When HR selects the date and submits the request, the RITM is created and when the RITM is approved, the task is created, but according to the date and time field which is the date selected, the task should be created at 6 pm on the same date.

how to select default value in catalog task activity so that task gets created only at 6 PM which is selected date?

Could you please help me on this to get the proper solution.

Thanks,

8 REPLIES 8

You state

> but according to the date and time field which is the date selected

so is the variable a date or a date/time?

Mani60
Tera Contributor

This is date/time variable

Mani60
Tera Contributor

@-O- 
I have tried this code in timer activity but proper output is not coming, if I select today's date then at 6 o'clock task should be created but this task is created immediately.

var now =new Date();
 
var eod =new Date();
eod.setHours(18);
eod.setMinutes(0);
eod.setSeconds(0);
 
answer =(eod.getTime()- now.getTime())/1000;
gs.log('Timer will fire @: '+ eod +'  '+(answer/60)+' minutes from now');

Would it be possible to change the type of the variable from Date/time to Date?

I mean I could come up with a solution to this problem, but it would be easier and cleaner if the type of variable last_work_date would be Date (and not Date/time).