Convert to date format from 05.09.2022 to 5.09.2022

Hi,

I want to search previous day’s date in column using Lookup Range activity. Since the date is in the form of 4.09.2022 in the Excel file, it cannot find it when I search for now.AddDays(-1).ToString(“dd.MM.yyyy”). Because in this way, it searches for the date as 04.09.2022. How can I print the date format as 4.09.2022?

can anyone help ?

Hi @nilesay

Welcome to uipath community

How about this expression

DateTime.ParseExact("05.09.2022","dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("d.MM.yyyy")

Regards
Gokul

image

HI,

How about the following?

now.AddDays(-1).ToString("d.MM.yyyy")

Regards,

it works, thank you

1 Like

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