datetime('x2017_12_1816:00_00', 'InputFormat', '''x''yyyy_MM_ddHH:mm_ss', 'Format', 'yyyyMMddHHmmss')
The tricks here:
- datetime uses MM for month and mm for minutes
- datetime uses HH for 24 hour hour
- any alphabetic character that is intended to be used literally must be put inside '' inside the string.
>> disp('''x''yyyy_MM_ddHH:mm_ss')
'x'yyyy_MM_ddHH:mm_ss
