Date format in MM/dd/YYYY HH:mm:ss

Hello Experts,

I am extracting data from excel and using it for further activities.
Date format in extract from excel is coming as MM/dd/YYYY HH:MM:ss. I need it in MM/dd/YYYY.
Looking for guidance on how can I achieve for all the rows in my excel.

Thank you.


Check as below

If the datatable is getting as number then check as below

Hope this helps you

Mark as solution if this resolves your query


1 Like

Hi @rohit.singhania

Try this way

date_1= DateTime.ParseExact(row(ColumnName).ToString,“MM/dd/yyyy HH:MM:ss” , System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yyyy”)

Mark it as solution if it resolves ur query


Nived N :robot:

Happy Automation :relaxed::relaxed: