How to write an expression which extracts date text from email body
I am trying to write an expression that will extract, from the email body, the date given after 'Start Date' (in this example, 28th December) and add that date it to the 'Start Time' Field in 'Create event (V2)', and do the same for End Date.
Even if I could do that, would the date format be compatible or would I need to add a further expression to convert into an acceptable date format (and if so, what might that look like?)
The following leave request has been Approved by your line manager.
Employee: xxxx xxxxxxxx
Leave type: ANNUAL LEAVE
Start date: 28-DEC-17
End date: 28-DEC-17
Currently the best I can come up with is:
substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'Start date '), 12),9
I'm a begginer at this so suspect that I'm some way off. Any suggestions/help would be greatly appreciated.