How to make this format given below as variable so that it can work for all dates (27-04-2022)?

image

Update: PLease check again…this forums input wasn’t allowing me to put in required format.

@anjasing

Try like this.

var = “M-19: PQR with AB/"+CDate(varDate).ToString("MM/dd/yyyy")

Here varDate variable holds input date value.

@anjasing Try this. Please find attached workflow

Example.zip (2.5 KB)

String of type Output = "M-19: PQR with AB/" + DateTime.ParseExact(InputDate, "dd-MM-yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy") + "/"

Output

1 Like

PLease check again the question being asked …mistake on my part

PLease check again the question being asked …mistake on my part

"M-19: PQR with AB/" + DateTime.ParseExact(inputDate, "dd-MM-yyyy", nothing).ToString("MM\\/dd\\/yyyy/")

e.g.
image

1 Like

Thank you so much. It worked perfectly fine :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.