Have dynamic cell position and read cell position +++

Hi all
@ImPratham45
I use LookUp to find dynamic cell and + - number if the value is known how many rows to look for.
I want get the value cell (13-Mar-2023) upper dynamic cell (Model of Payment) but I down’t know how many empty rows. how can get this value
DLV010 - Copy (1).xaml (14.0 KB)

image

@anh.nguyen

After reading data try filtering the column with empty …and then they would be side by side…so find mode of payment and then immediate top row would be the date

cheers

1 Like

Hi

I can find “Mode of Payment” ? at K16 → K column

How can change K to index to filter ?

Thank all,

I use UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex(“Var”)

1 Like

output like: 01/19/2023 00:00:00 (MM/dd/yyyy 00:00:00)
help me change 19/01/2023 (dd/MM/yyyy)
thank you

@anh.nguyen ,
Try this,

DateTime.ParseExact("01/19/2023","MM/dd/yyyy",CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")

Note : Please Import System.Globalization
image

image

Regards,

1 Like

my output is object var: dt

DateTime.ParseExact(dt.ToString,“MM/dd/yyyy”,CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

o

@anh.nguyen ,
I believe dt is your data table right?
Actually you have to mention the date value there which is in MM/dd/yyyy format.

Regards,

1 Like

Yes, output as pic, now i want change to dd/MM/yyyy

@anh.nguyen ,
Please provide dt1 instead of dt here

Try like this,

DateTime.ParseExact( dt1,"MM/dd/yyyy hh:mm:ss",CultureInfo.InvariantCulture).ToString("dd/MM/yyyy hh:mm:ss")

Regards,

1 Like

Hi @anh.nguyen ,

Use the below expression:

Cdate(dt1.tostring).toString("dd/MM/yyyy")

Regards,

2 Likes

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