Dear Members,
I have got date in an excel column in the format - 17 July 2019 . I want to read it in uipath and convert it into a date data type of dd-mmm-yyyy.
Could you please let me know the easiest way to do the same ?
Regards
Minal Gupta
Dear Members,
I have got date in an excel column in the format - 17 July 2019 . I want to read it in uipath and convert it into a date data type of dd-mmm-yyyy.
Could you please let me know the easiest way to do the same ?
Regards
Minal Gupta
Try this:
DateTime dateParsed = DateTime.ParseExact(row(“DateColumn”).Tostring, “dd-MMMM-yyyy”, System.Globalization.CultureInfo.InvariantCulture)
You can create a variable type with date and the string which you read from excel can be convert like this
Datevar=cdate(datestr)
Thanks
Aman
Hi @MinalGupta
Assign strvar=row(“column name”). ToString
Use assign strvar2=cdate(strvar)
Thanks
Ashwin.S
Hi @MinalGupta
Hope this would help you
Out_datevalue = DateTime.ParseExact(row(“yourcolumnname”).Tostring.Substring(0,10),”dd-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture)
Cheers
Hi,
I tried as you mentioned and its working perfectly…
Thanks
Kumar
@lakshman , @palaniyappan - Not working in my case as the date in excel is “7 May 2019” format.
StringToDateTime.xaml (5.2 KB)
Hi @MinalGupta
Please try how @AshwinS2 described and the thing is i tried and that’s working…
Thanks
Kumar
@AshwinS2 - thanks its working
thanks @kumarD
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.