0

I have a date for example in the following format in column A

03/03/2020 01:48:18 pm (Currently Month, Day, Year and 12 hour format for time)

I would like to read the date in Column A and insert into Column B into the following format

2020/03/03/ 13:48:18( Need format Year, Month, Day and 24 hour format)

Would like a query to search for all records in Column A and insert into Column B , row for row

0

1 Answer 1

1

This solution assumes that the second number in 03/03/2020 is the mionth,because that is discernable from your text

SELECT DATE_FORMAT(STR_TO_DATE("03/03/2020 01:48:18 pm", "%d/%m/%Y %r"),'%d,%m,%Y %H:%i:%s');

Gives you as result

03,03,2020 13:48:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.