Get Date text from excel

How do I get Exact date text from excel record.
I am trying to get date record from my excel with date format (“DD/MM/YYYY”)

Here is my Excel

Here is my Syntax
image

Result
image

@Vincent_Nuestro - Could you please try to change the formula in excel as shown below…I guess it is reading printing as DD & YYYY because it is not valid date formats syntax.

image

If this doesn’t work, then instead of adding this formula in excel you can datetime.parseexact to convert your date in column B to the desire format for BOT’s entering.

hi @prasath17 Nothing happens sir, same output.

I tried to use parseexact

DateHire = String
DateHired01 = Datetime

Error

@Vincent_Nuestro - If you could send the sample sheet , and let us know the expected output … we could try here…

1 Like

hi @prasath17

Here is my sample excel file.
Book1.xlsx (11.6 KB)

my expected output should be same

@Vincent_Nuestro - Did your requirement changed? In your question above, you wanted to convert it to dd/MM/yyyy format. But in the excel , I can see you wanted to convert it to MM/dd/yyyy format …is that correct?

image

@prasath17 i am wrong sir, it should be (dd/MM/yyyy)

@Vincent_Nuestro - Please check this…
Book1.xlsx (130.2 KB)
Main.xaml (7.6 KB)

Couple of questions: Did you searched in the forum for datetime.parseexact ?? there are so many topics on this and lot of them has xaml attached. Suggestion: Please browse through the forum thoroughly and try various solution offered.

1 Like

hi @prasath17 can i have sir the xcreenshot?

icant open the file

@Vincent_Nuestro -

IF

CurrentRow("DATA NEEDED").ToString = "Hire Date (MM/DD/YYYY)"

Write Line

CurrentRow("TA TO FILL OUT").ToString

Assign

CurrentRow("FOR BOT'S YES ENCODING") = DateTime.ParseExact(CurrentRow("TA TO FILL OUT").ToString,"MM/dd/yyyy hh:mm:ss",CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
1 Like

Hello @Vincent_Nuestro have you tried using this property to read excel files…?

image
This option will read everything as a string.

1 Like

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