I’m extracting text from invoices. The challenge I have is that most of them have the long, textual, date format i.e.: “28 december 2018”
Could someone suggest (or better still, provide the code!) a means for me to convert this date into a short form date field (28/12/2018 or 28-Dec-2018) so that I can interface more easily with other platforms? I was hoping there would be a pre-existing function to do this but maybe there isn’t?
Thanks so much for coming back to me. I understand the code but am not quite sure how to put this into play when using the GUI of the UiPath Studio. Do you have a single step example project I could look at - a screenshot would do - which just shows what I need to do with the variables I have?
First Assign:
invoiceDateString = “28 december 2018”
Second Assign:
invoiceDate = DateTime.Parse(invoiceDateString)
invoiceDateString is type String
invoiceDate is type System.DateTime
Just replace my variable names with what you are using for a String and a DateTime and then you can format the output string however you want. My log message activity will print “28/12/2018”.