Convert string format date to the Date format

After read range activity, I am getting date as this type ‘44244’ which originally should be ‘2/17/2021’, which generally fixes by doing Format Cells in Excel to Date format but how can we achieve this using Uipath.

Can anyone help with this? Thanks in advance.

Hi @shandilya.suthar15 …Please use Preserve Format in the Read Range.

Hi @prasath17 , I was previously using Preserve Format but there were some issues in it so I don’t want to use it.

@shandilya.suthar15 …Oh okay…In that case, can you please try the read range for workbook …

Also check this post

Hi @shandilya.suthar15
Try this:
DateTime.FromOADate(Convert.ToDouble(row(“yourcolumnname”).ToString)).ToString(“MM/dd/yyyy”)

1 Like

This worked, Thank you so much @pravin_calvin

1 Like

Credits @Palaniyappan

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