Oldest question in the book.

Google says:

SELECT NOW()+ 0;

And a bunch of other things like UNIX_TIMESTAMP() but doing a select on these, it only returns the seconds, not including the miliseconds.

Basically, I need, from MySQL's side the milliseconds. How can I do this?

Recommended Answers

All 3 Replies

 CURTIME([fsp])

As of MySQL 5.6.4, if the fsp argument is given to specify a fractional seconds precision from 0 to 6, the return value includes a fractional seconds part of that many digits. Before 5.6.4, any argument is ignored.

Intresting: Im running 5.5.35 on Ubuntu...

Is 5.6.x stable? Ill upgrade to it if neccesary (as long as it doesnt mess anything up)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.