I need to parse the audit record of our crm database based on sql server. the audit looks like :
'1~240000.0000~37758.4100~05/18/2016 10:59:00~transactioncurrency,424160c2-b401-e211-a11d-5ef3fcdaf1b7~~~'.
The delimiter is the '~' char. In the example above I want to extract the datetime 05/18/2016 10:59:00, which is the 4th data stored here. The position can vary.
I'll tried to use charindex but it doesn't accept an occurence number of the searched string. I cannot use sql function because I call the sql code from excel, which doesn't let me define function.
Thanks in advance for your help