How to Get Excel cell custom format

Hi Team,
I have a requirement to check whether row values are of format (YYYY-MM-DD HH:MM)

Explanation:
In my excel there is a column called “Invoice date” and one of its row value is “2021-03-18 22:00” (YYYY-MM-DD HH:MM) but when i read that cell from uipath i was getting the value as “3/18/2021 10:00:00 PM” .

I got one partial solution when i check the Preserve Format property in read range (2021-00-18 22:00) bot was not able to get “MM” value.

we Need help on this .

Thanks in advance.

Regards,
Akhil B

image

@Bachali

Check below for your reference

Reference

Hope this may help you

Thanks

1 Like

@Bachali

What is the problem that you are facing regarding the date ?

Is there any operation that is being affected by the format of date?

Please explain

1 Like

Hi Srini,

Thanks for the reply

i just wanted to check whether the cell format is “YYYY-MM-DD HH:MM”, If we convert the value to CDate or DateTime Prase it will come in the form of system date which i don’t want.

Regards,
Akhil B

Hi @kumar.varun2 ,

I’m trying to validate the cell format whether it is in ("YYYY-MM-DD HH:MM ")

@Bachali

Can you share the sample excel file?

Also, are you using the Excel Application To Read the file?

1 Like

Hi @kumar.varun2

I’m using normal workbook readrange , i will use Excel Application scope and let you know the results .

Regards,
Akhil B

@Bachali

Also try the preserve format option in EAS Read Range

1 Like

Hi @kumar.varun2

GoodNews!
when i tried with excel application scope with preserve format its working fine.

Thanks for the continuous support.

Regards,
Akhil B

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