DateTime variable conversion to String

Hi All, Thanks for reading. I want to convert a variable of type DateTime to String type. How can i do that ??

Note - I can successfully do the opposite ie convert String variable to DateTime with DateTime.ParseExact function.

Hi,

Can you try as the following?

dateTimeVar.ToString("format")  

ex.

dateTimeVar.ToString("yyyy/MM/dd")

Regards,

1 Like

No this is not working

Hi,

It works in my environment as the following.

img20211116-9

How did you check if it works?

Regards,

Yes this works in Message box but i want to use in Assign activity.

Hi,

It also works in Assign as the following.

If you have any problem, can you share it with screenshot etc?

Regards,