Extract datetime value from the file name

David_Billa
New Contributor III

I've the filename as below and I want to extract the datetime values and convert to datetime data type. 

This_is_new_file_2024_12_06T11_00_49_AM.csv

Here I want to extract only '2024_12_06T11_00_49' and convert to datetime value in new field. I tried Substr with yyyyMMddHHmmss and it's not working. It's producing only null values instead of the datetime value.

Any help?