How do I convert the format of the date?

Hey All

I have an Excel with a date like in the screenshot attached below.

image

I want to read it and enter it in a web application like 02-01-1996

How do I achieve it ?

Kindly drop an xaml file

Thanks

Hi @uio

=> Use Read Cell Workbook to read the cell value and store the output in a variable say DateValue. Please check the Preserve Format option in the properties Panel

=> Use below syntax in Assign:

ConvertedDateValue = DateTime.ParseExact(DateValue,"d-MMM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy")

=> Use Use Application/Browser and inside that use Type Into Acitvity and pass ConvertedDateValue in Type Into.

Check the below image for better understanding:

Sequence3 3.xaml (13.3 KB)

Regards

HI,

Can you try the following sample?

Sample
Sample20240619-4.zip (9.3 KB)

Regards,

Hi @uio

Try:

CDate("2-Jan-96").ToString("dd-MM-yyyy")


image


Hope it’ll helps you :slight_smile:
Cheers!!

Hi @uio

Try the below sequences.
Date Format.zip (9.4 KB)

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