I am trying to extract a date from excel data but it returns time with zeros like this 7/16/2021 00:00:00 how to remove zero and how to reformat date in this form yyyy-mm-dd
once after reading datatable pass that dt to FOR EACH ROW activity as input and inside the loop use a assign activity like this
row(“column name of date”) = Datetime.ParseExact(row(“Column name of date”).ToString.SubString(0,10).ToString.Trim,“MM/dd/yyyy”,system.Globalization.CultureInfo.InvariantCulture).tostring(“yyyy-MM-dd”)
simply try with same assign activity but with different expression like this
row(“Column name of date”) = Convert.ToDatetime(CurrentRow(“Column name of date”)).ToString(“yyyy-MM-dd”)
Hope this would help you
is the issue resolved.
After extracting the date are you writing it in another excel file and is it showing zeros there?
Suggestion - Use Excel Scope Activity for reading (Read Range) and writing (Write Range Acitivity) the excel files and not the Workbook activities.