java seeker
java seeker

Reputation: 1266

Current Time in millisecond

I am writing a stored procedure in mysql and want to insert system's current timestamp into millisecond format. is there utilities or function which can give time in millisecond what java's system.currentimeinmillisecond do.

Upvotes: 1

Views: 134

Answers (2)

Scary Wombat
Scary Wombat

Reputation: 44834

Have a look at this page which explains the use of

SELECT MICROSECOND('2010-12-10 14:12:09.019473');

as MySQL 5.6.4 and up expands fractional seconds support for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision

Upvotes: -1

Deepak Rai
Deepak Rai

Reputation: 2203

mysql> SELECT UNIX_TIMESTAMP();
+------------------+
| UNIX_TIMESTAMP() |
+------------------+
|       1392786039 |
+------------------+
1 row in set (0.00 sec)

Upvotes: 3

Related Questions