I have a set of data where I have a couple different formats for dates and I am creating a new column to convert the dates to one format. The dates are in d/m/y h:m:s format. When I run the script all of the 2019 dates translate fine, but the 2020 dates get their month day reversed. If I go into column information and change the settings manually it works fine. What can I do within JSL to retain the correct format?
DateTime
5/1/2020 1:10
5/1/2020 1:10
5/1/2020 1:10
30-12-2019 14:01:18
30-12-2019 14:01:18
30-12-2019 14:01:18
New Column("DateTime2",numeric,"Continuous",format("d/m/y h:m:s",22,0),input format("d/m/y h:m:s",0));
for each row( :DateTime2 = num(:DateTime));
DateTime DateTime2
5/1/2020 1:10 01/05/2020 1:10:00 AM
5/1/2020 1:10 01/05/2020 1:10:00 AM
5/1/2020 1:10 01/05/2020 1:10:00 AM
30-12-2019 14:01:18 30/12/2019 2:01:18 PM
30-12-2019 14:01:18 30/12/2019 2:01:18 PM
30-12-2019 14:01:18 30/12/2019 2:01:18 PM