Copy Date field value to Date Time field

madanm7786
Mega Guru

Hi All,

I have a Start and End Date(Date type) variable in my catalog item. User will provide those dates and submit the request.

I have Start and End date(date time type) in the custom table.

i have written a script to copy the date field value from variable to date time field value in custom table.

But it is not working. Start and End date fields are empty.

Below is my script.

gr.u_start_date = current.variables.v_start_date + "00:00:01"; //beggining of the day
gr.u_end_date = current.variables.v_end_date + "23:59:59"; //end of the day
gr.update();

 

Thanks,

Maddy

 

1 ACCEPTED SOLUTION

Dante Ditan
Kilo Sage

Hi,

 

Can you please try to put space on + " and see if it works?

 

Updated:

gr.u_start_date = current.variables.v_start_date + " 00:00:01"; //beggining of the day
gr.u_end_date = current.variables.v_end_date + " 23:59:59"; //end of the day

 

thanks

Dante

View solution in original post

2 REPLIES 2

Dante Ditan
Kilo Sage

Hi,

 

Can you please try to put space on + " and see if it works?

 

Updated:

gr.u_start_date = current.variables.v_start_date + " 00:00:01"; //beggining of the day
gr.u_end_date = current.variables.v_end_date + " 23:59:59"; //end of the day

 

thanks

Dante

Hi Dante,

Yes got to know it from the log statement. Space between " and 00 worked.

Thanks,

Maddy