[Solved] UiPath to show timestamp in message box

Hi

I want to display current date and time in the message box activity. Any leads would be appreciated.

HI,

What format do you need? The simplest is just Now as the following.

image

Regards,

1 Like

Thank you. I want to show timing in US format with date and time

HI,

Can you share specific expected output?

If MMMM d, yyyy HH:mm:ss style, the following ToString method will work

Now.ToString("MMMM d, yyyy HH:mm:ss")

Regards,

Hi @Sathish_Ashokan

You can use the below expression to get the US time now

CurrentUSTime = TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")).ToString("yyyy-MM-dd HH:mm:ss")

Check the below workflow for better understanding.

Hope it helps!!

1 Like