You can use rex to get the date substring and then use strptime and strftime to date format. Suppose your string is x="ABCD_20190219_XYZ", then use the below command.
rex field=x "_(?<date>\S{8})"| eval time=strptime(date,"%Y%m%d")|eval Date=strftime(time,"%m/%d/%Y")
You can use rex to get the date substring and then use strptime and strftime to date format. Suppose your string is x="ABCD_20190219_XYZ", then use the below command.
rex field=x "_(?<date>\S{8})"| eval time=strptime(date,"%Y%m%d")|eval Date=strftime(time,"%m/%d/%Y")