How to read date from excel and write into date picker on website?

I currently have an excel file with information on it, which includes a date.
The date is in the format of yyyy/MM/dd on excel and the website has a date picker in the form of yyyy/MM/dd HH:mm

How do I go about writing the excel date into the the date picker cell?

Excel:
image

Website:
image

Hi @Adel221b

Try this

FormattedDate= DateTime.ParseExact(excelDate.ToString(), "yyyy/MM/dd", CultureInfo.InvariantCulture).ToString("yyyy/MM/dd HH:mm")

Hi @Adel221b

Try this code:
formattedDate = DateTime.ParseExact(excelDate.ToString("yyyy/MM/dd"), "yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy/MM/dd HH:mm")

Do I put the code in the Type This textbox?

image

@Adel221b

You can either use assign activity to store the value in a string variable and pass that variable in type into activity or you can directly pass this expression in type into.
DateTime.ParseExact(excelDate.ToString("yyyy/MM/dd"), "yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy/MM/dd HH:mm")

Note: In excelDate pass your input date string variable.
If type into didn’t work use set text activity.

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