mysql - ERROR 1582 (42000): Incorrect parameter count in the call to native function 'STR_TO_DATE' -




i looking regarding error receiving in mysql. new mysql. have following table:

+--------------+--------------+------+-----+-------------------+-----------------------------+ | field        | type         | null | key | default           |                       | +--------------+--------------+------+-----+-------------------+-----------------------------+ | date         | date         | no   |     | null              |                             | | time         | timestamp    | no   |     | current_timestamp | on update current_timestamp | | messure      | decimal(9,2) | no   | pri | null              |                             | | inject_units | decimal(9,2) | yes  |     | null              |                             | +--------------+--------------+------+-----+-------------------+---------------- 

i using below query insert data table

insert sugar_levels (date, time, messure, inject_units) values ('2017-08-22',str_to_date('2017-08-22 05:50:00', 'y%-m%-d% h%:m%:s', '11.7', '12')); 

but getting following error:

error 1582 (42000): incorrect parameter count in call native function 'str_to_date' 

please might simple syntax error.

3 errors:

first % sign must before letters second missing %sign before second placeholder third bracket @ wrong place:

insert sugar_levels (date, time, messure, inject_units)   values ('2017-08-22',str_to_date('2017-08-22 05:50:00', '%y-%m-%d %h:%m:%s'), '11.7', '12'); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -