Insert date into custom template

I had created one custom template in that I want to insert current date how can i insert that,for getting date i used this → Now.ToString(“dd/mm/yyyy”) and i got the date but now want to insert that into custom template that i had created how can i do that ? can someone help…

1 Like

Sorry @Mayur_Pawar, I don’t understand this, can you please explain

I created one template in notepad. now i want to send it to customer and in that template i want to pass current date along with message that i have written.

In the space of {0} i want to pass the current date

1 Like

Yeah got it @Mayur_Pawar,

Do these steps :slight_smile:

  1. read the text file and store the text in a string variable
  2. Get the date and store in another variable
  3. Use string manipulation activities like text.Replace("{0}", dateString) and use that string wherever required

Hope I’m clear

Hope these steps would help you resolve this
—use read text file activity and get the output with a variable of type string named intext
—now use a assign activity like this
intext = String.Format(intext,Now.ToString(“dd/MM/yy”))
—where now the place holder {0} will be replaced with the date value

—you were almost done because these kind of place holder is used when we use String.Format method

Cheers @Mayur_Pawar

1 Like

thanks @Palaniyappan

1 Like

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