Date to string transform in flow designer

marclindsay
Tera Guru

I have a sub-flow input variable that is a Date.

marclindsay_2-1740455233710.png

Need to convert this to a string in the format yyyy/MM/dd.

Using the "Date to String" transform to pass this to an Action. 

marclindsay_0-1740454985917.png

 

Keeps the date in the format MM/dd/yyyy. Does not change the format. 

marclindsay_1-1740455052709.png

 

Also noticed this comment in the logs:

2025-02-25 03:37:36 .....Warning.....DATE_TO_STRING with name com.glide.transform.adapter.DateToStringAdapterRule: Failed to parse input: Unparseable date: "02/24/2025"

 

I am also using the Key Value Map transform and that works perfectly fine. Not sure why the Date to String transform will not work. 

 

 

6 REPLIES 6

DeependraS
Tera Expert

Instead of Date to String, try using the Format Date Action in Flow Designer:

Go to your Flow Add Action → Data Manipulation → Format Date

Input Date: Your sub-flow date variable

Date Format: yyyy/MM/dd

Use the formatted output in the Action

I don't see a "Data Manipulation" Action

marclindsay_1-1740457323320.png

 

 

1️⃣ Open Your Flow:

Navigate to Flow Designer (/flow_designer.do)

Open your existing Flow or create a new one

2️⃣ Add an Action:

Click on "Add Action" (+ icon)

In the "Action" search bar, type: "Format Date"

Select "Format Date" under Data Manipulation

Ankur Bawiskar
Tera Patron
Tera Patron

@marclindsay 

why not change it to string type then as input?

try to use custom action and use script to convert

If my response helped please mark it correct and close the thread so that it benefits future readers.

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