CURRENT_TIMESTAMP in milliseconds

后端 未结 19 951
失恋的感觉
失恋的感觉 2020-12-07 23:48

Is there any way to get milliseconds out of a timestamp in MySql or PostgreSql (or others just out of curiosity)?

SELECT CURRENT_TI         


        
19条回答
  •  旧时难觅i
    2020-12-08 00:28

    Do as follows for milliseconds:

    select round(date_format(CURTIME(3), "%f")/1000)
    

    You can get microseconds by the following:

    select date_format(CURTIME(6), "%f")
    

提交回复
热议问题