The CreatorCon Call for Content is officially open! Get started here.

Change Date to Date/Time and update Due_date

Mohamed Rahim1
Giga Contributor

I have a catalog item where the user provide date variable, and the requirement i have is to take this Date let's say (31/03/2022) and convert it to (31/03/2022 11:59:00) - the time is fixed meaning that it will always be 11:59:00 regardless the date input, then update the SC_Req_item.Due_date with the new date/time (31/03/2022 11:59:00)

The flow is created by the flow designer.

Can you help me with how to do this and if it requires a script in the flow designer can you help with the script too

1 ACCEPTED SOLUTION

Hi,

update as this

if (fd_data._1__get_catalog_variables.question1 == "yes") {
    return fd_data._1__get_catalog_variables.date + ' 23:59:00';
}
else {
    return fd_data._1__get_catalog_variables.date + ' 17:00:00';
}

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Hi,

update as this

if (fd_data._1__get_catalog_variables.question1 == "yes") {
    return fd_data._1__get_catalog_variables.date + ' 23:59:00';
}
else {
    return fd_data._1__get_catalog_variables.date + ' 17:00:00';
}

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader