How to write correct dateTime format in uipath

I got correct datetime without changing format.But,When I changed date ,I did not get correct data.
Why I cannot get correct date and time?

@LwinMoeAUNG Can you elaborate more what you are trying to achieve

I want to take run time for each sequence.So,I used DateTime.Now to get Start and End time.I used this “(dateTimeend.Subtract(dateTimestart)).ToString” to know how long take to run for each sequence.
And,I displayed result by message box and write line.In that display activity,The result is true,
For example,Let I got result,0:01:45 ,in display activity,that result show.But,When I wrote in excel,it is showed 0:01:45.But, When i clicked that cell,Hours is not correct.Please Look in the picture…In that picture ,I ran this robot at 9:03 AM.But,In the excel,result is showing 12:00AM.

Could you help me about this problem please?

@LwinMoeAUNG In excel change the format to general or text and try

I did .But ,I cann’t solve this problem.:disappointed_relieved:

@LwinMoeAUNG Is it possible to attach your workflow

Uploading: Screenshot (54).png…


Sorry bro,I cannot support the whole workflow because It has some rules.

@LwinMoeAUNG how you want you final output to be ?
Could you give an example?

I want only 2019/01/23 (current time)

Can you specify the time format like “HH:MM:SS”?

2019/01/23 HH:mm:ss

Hello!

Take a look into this example: runtimeExample.xaml (17.4 KB)

And then try to write in the excel file the output from the TimeSpan variable as String. If it doesn’t work, it might be a Excel configuration issue.

Hope it Helps :slight_smile:

Regards,

1 Like

Thanks all bros…
I got it.Its has Excel issue.

Best Regards,
Lwin Moe Aung

1 Like

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