Convert string to date & time

0
I am trying to convert ‘20221206-080136’ this string to date & time using  parseDateTimeUTC(‘20221206-080136’,'yyyyMMDD-HHmmss') The result is : UTC time: 2022-01-06 08:01:36.000 but it should be 2022-12-06 08:01:36.000. What am I missing?
asked
1 answers
1

I think your format string should be 

yyyyMMdd-HHmmss

 

Instead of 

yyyyMMDD-HHmmss

 

Also, make sure to test with sample data that includes hours greater than 12 to make sure your time pattern works correctly.

answered