0

This if from

oracle to_timestamp('17-SEP-20 12.32.25.644000000 PM','DD-MON-RR HH.MI.SSXFF AM')

Need something like this for sql

STR_TO_DATE('17-SEP-20 12.32.25.644000000 PM','%d-%b-%Y %H.%i.%s.%f %p')
jarlh
  • 42,561
  • 8
  • 45
  • 63
  • i am not able to handle that many millisecond. But this one is working. `SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(STR_TO_DATE('17-SEP-20 12.32.25.644 AM', '%d-%M-%Y %h.%i.%s.%f %p')),'%m-%d-%Y %h:%i:%p')` – Koushik Roy Oct 08 '20 at 14:25
  • As a rule of thumb I avoid using the `TIMESTAMP` data type in MySQL. It can be error prone since it heavily depends on the server configuration and not your appliction logic. Also it'll become obsolete in 18 years from now (in 2038). Use `DATETIME` instead. – The Impaler Oct 08 '20 at 15:49

0 Answers0