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
Hi @Mohamed_Hassan1 ,
If you are holding this value in DateTIme variable then just use datetimevariable.ToString(“MM-dd-yyyy”)
Welcome to UiPath community
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”) = row(“Column name of date”).ToString.SubString(0,10).ToString.Trim
or
if we want in specific format we can mention that format in ToString(format we want)
row(“Column name of date”) = Convert.ToDatetime(CurrentRow(“Column name of date”)).ToString(“yyyy-MM-dd”)
for more details on diffferent date format
Hope this would help you
Cheers
thank you
if i want in this format but in string not datetimevariable
Try this CDate(yourvariable).ToString(“MM-dd-yyyy”)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.