How to change date format in UiPath

Hello guys,

I am facing troubles with converting to the format I need (dd.MM.yyyy).
I am getting MM/dd/yyyy. Could you please tell me what do I have to change?

Could you please check and help me?

Thanks in advance

1 Like

Well can i have a view on the output once if possible as a screenshot
actually that should work
it should give only the format been mention within ToString()
Cheers @vadimpostica

Hi @Palaniyappan .

But where should I use this buddy? Could you indicate me that specific space?


Fine @vadimpostica
lets go one step at a time
i have one doubt, i hope the variable type of endofpreviousMonth is datetime , right…?

You are right, @Palaniyappan

This is the resultCapture

Try this expression once
in a write line activity and check with the output panel whether we are getting the format that we have mentioned, share that screenshot of the output panel as well buddy
Cheers @vadimpostica

1 Like

@Palaniyappan this is the assign activity

1 Like

Oh what value we are trying to pass to endofpreviousMonth variable
Cheers @vadimpostica

New DateTime(now.Year,now.Month,1)


It worked.

Thanks, @Palaniyappan

1 Like

Fine i got it what you were trying to pass
but remove that .ToShortDateString atlast, as it will convert the datetime to string
thats why throwing error in the assign activity

Cheers @vadimpostica
Kindly close this topic buddy, that could help others as well

@Palaniyappan how can I do it?

I am new here.

Thanks, buddy

You did, but changed the marking now
Cheers @vadimpostica

thanks, buddy

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