Quantcast
Channel: Toad for MySQL
Viewing all articles
Browse latest Browse all 1315

Forum Post: DateTime subseconds off by 10x on mysql-5.6.16-winx64 & Toad 7.2.0.2922

$
0
0
I am using camera EXIF data which shows hundredths of a second for image SubSecCreateDate to differentiate images shot in burst mode at many rounds/second. TOAD displays the hundredths of a second as thousandths, inserting a leading zero just after the decimal point separating seconds from subseconds.  “.40” seconds is being incorrectly displayed as “.04” Here is the RAW DATA: exiftool.exe -SubSecCreateDate pf-2013.0331-122707.p1c.mammatus.30k.jpg Create Date                     : 2013:03:31 17:08:36.40 In TOAD, select  tools - options - grid - custom yyyy-MM-dd HH:mm:ss.ff to display hundredths of a second. The field, “create_date” is declared as a datetime(2) to fit the hundredths of a second provided by the EXIF data. This definition shows up correctly in viewer - table - columns - type When you select the “create_date”, datetime field, the data grid displays “2013-03-31 14:53:26.04”. The subSecond value shown is 40 thousands. The correct value is 400 thousands. To test whether the correct value is actually being stored, test it on the command line: mysql update zip set create_date='2013-03-31 14:53:26.40' where zid=114827; Query OK, 1 row affected (0.00 sec) mysql select create_date from zip where zid=114827 ; | create_date            | | 2013-03-31 14:53:26.40 | This correctly shows 4 tenths. When you select the microseconds of the datetime and divide by 1000 to create milliseconds, the correct result is shown as 400. See the attached screen capture. The GUI is mangling the data, dividing hundredths of  a second by 10 to make it look like milliseconds.

Viewing all articles
Browse latest Browse all 1315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>