How to Convert date into specific format

Can anyone please help me to convert the date format into specific format.
I want to convert the date in ddMMyyyy format, currently the value is showing as per below.
image

I was tried some methods like below, but its give me wrong OP.

Convert.ToDateTime(Production_Start_Date).ToString(“ddMMyyyy”)
cDate(“Production_Start_Date”).toString(“ddMMyyyy”).

@nilesh.mahajan
You can use Format Value activity available under UiPath activites and choose datetime under set format.

@nilesh.mahajan

Welcome to community.

Try using below expression.

DateTime.ParseExact(“input_date”,“Format”, System.Globalization.CultureInfo.InvariantCulture)

3 Likes

@nilesh.mahajan, Ideally Convert.ToDateTime(Production_Start_Date).ToString(“ddMMyyyy”) should work. Can you please let me know what are you getting as output. Also, ensure the “Production_Start_Date” variable has proper value like “02/20/2020 00:00:00” (without square bracket).

Cheers

2 Likes

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