I’m looking to trim part of my date time variable.
My variable, converted to string from an excel cell, right now shows the date/time as “11/04/2018 00:00:00”. I would like to trim the “00:00:00” part so I just have the date. How do I do this?
Hi @Spacecats7
Store that in string variable like strName and use
strName.split(" "c)(0)
you will get only date removing the rest.
If you find it useful mark it as solution.
Cheers…
This usually occurs when we are trying to read the date value from excel
So this can be resolved with these steps buddy
–use excel application scope activity and pass the file path as input
–use read range activity and get the output with a datatable variable named out_dt
–use a for each row activity and pass the above variable out_dt as input
–inside this loop use a activity called assign and mention as row(“your date columnname”) = Split(row(“your date columnname”).ToString.Trim," ")(0).ToString.Trim
so all the date value in the column which has data value will now have only the date and not the time part
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @Spacecats7