MYSQL convert float to datetime -
i want this:
37442.3992708333 -> 05-07-2002 09:34:57
but when try 'easier' syntax, not work. like:
select convert(float, '15.6'); result should be: 15.6
i errors like:
#1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'float, '15.6')' @ line 1
i try syntax in xampp phpmyadmin in sql commands.
server version: 5.6.20 - mysql community server (gpl) apache/2.4.10 (win32) openssl/1.0.1i php/5.5.15 phpmyadmin 4.2.7.1
you'll need use sec_to_time() function.
it unclear haven't provided enough information float represents haven't been able write sample - documentation link above detailed should able work out there.
update comment:
if float comes excel then:
you need research how excel generates float (i'm not going research you) , reverse process store mysql datetime field
if coming excel can not create mysql date friendly column formula of
=text(a3,"yyyy-mm-dd")
- changinga3
cell reference excel date (float)?
Comments
Post a Comment