{question}
How to convert DATETIME(6) with milliseconds to UNIX_TIMESTAMP with millisecond?
{question}
{answer}
Currently, in SingleStore Database, we don't have a direct way to get UNIX_TIMESTAMP in Milliseconds.
But alternatively below query can help in achieving it.
SELECT CONCAT(unix_timestamp('2021-07-18 11:00:00.195100'),'.', microsecond('2021-07-18 11:00:00.195100')) AS UNIX_TIMESTAMP_MS;
The output of the above command:
+-------------------+
| UNIX_TIMESTAMP_MS |
+-------------------+
|1626606000.195100|
+-------------------+
Click here to learn more about DATE and TIME Function in SingleStore.
{answer}