Typing the current date without the time

Hey guys

I need to type date on yyyy-mm-dd format
And I’m using DateTime.Now
And it’s gave the wrong date

Actually it types the minutes in mm instead of the month

I need an expression gives me the date in that format without the time

Hope you can help I’m getting stuck


1 Like

Hello @N_Qahtani and welcome the community :partying_face:

Try the following:

Also - check out this link to understand the differences between ‘M’ and ‘m’:

Hopefully this helps


Hi Mate,

Use System.DateTime.now.toString(“yyyy-MM-dd”).

Hope it helps,
Thanks and regards.


also you can use


1 Like


Check as below for your reference
Convert Date & Time Format Tutorial

Hope this helps you


Hi @N_Qahtani
Welcome to Uipath Community!

Actually, you are using the correct command that needs only small changes, when you use DateTime.Now its returns date + time
so you need only date , you have to made the expression of frunt as you need (yyyy-mm-dd)
and you can change any position of like (mm-yyyy-dd) will show you the year on middle

Correct code : system.DateTime.Now.ToString(“yyyy-MM-dd”)
Main.xaml (4.3 KB)

Hello use


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