Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow Payload step date format

CV1
Tera Contributor

Hello all,

How to convert date in flow payload step to sent JSON as MM/DD/YYYY. Currently its sending as "01-22-2024"

 

2 REPLIES 2

Amit Verma
Kilo Patron
Kilo Patron

Hi @CV1 

 

From which action is the data pill for date is being generated ? If possible, can you please share a snip of your action with all the steps listed ?

 

We need to do the transformation on the step above the Payload Builder Step and then pass it on.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

CV1
Tera Contributor

Hi @Amit Verma,

The pill is from input table(project)
I was able to achieve this by :

  var gd = new GlideDate();
  object.trandate = gd.getByFormat("MM/dd/YYYY");

Thanks