SQLite Current Timestamp with Milliseconds?

后端 未结 4 1801
感动是毒
感动是毒 2020-12-29 04:57

I am storing a timestamp field in a SQLite3 column as TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP and I was wondering if there was any way for it to include mi

4条回答
  •  温柔的废话
    2020-12-29 05:36

    Here's a query that will generate a timestamp as a string with milliseconds:

     select strftime("%Y-%m-%d %H:%M:%f", "now"); 
    

    If you're really bent on using a numeric representation, you could use:

    select julianday("now"); 
    

提交回复
热议问题