Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 我的Sql更新字符串日期时间_Mysql_Sql - Fatal编程技术网

Mysql 我的Sql更新字符串日期时间

Mysql 我的Sql更新字符串日期时间,mysql,sql,Mysql,Sql,我尝试了很多例子,但没有人能解决我的问题。下面是我尝试过的一些例子。只需将字符串日期更新为可为空的日期时间列。我得到的是000-00-00或空列 感谢您的帮助,我是mysql的新手,正在努力理解:/ Update `scorelisting` set MaxScoreDate=DATE(STR_TO_DATE('13.05.2012 15:31:00','%d.%m.%Y %H:%M:%S')) where UserId=258070 Update `scorelisting` set

我尝试了很多例子,但没有人能解决我的问题。下面是我尝试过的一些例子。只需将字符串日期更新为可为空的日期时间列。我得到的是000-00-00或空列

感谢您的帮助,我是mysql的新手,正在努力理解:/

Update `scorelisting` 
set MaxScoreDate=DATE(STR_TO_DATE('13.05.2012 15:31:00','%d.%m.%Y %H:%M:%S')) 
where UserId=258070

Update `scorelisting` 
set MaxScoreDate=STR_TO_DATE('13.05.2012 15:31:00','%d.%m.%Y %H:%M:%S') 
where UserId=258070

Update `scorelisting` 
set MaxScoreDate=DATE('%d.%m.%Y %H:%M:%S',STR_TO_DATE('13.05.2012 15:31:00')) 
where UserId=258070

Update `scorelisting` 
set MaxScoreDate=DATE('%d.%m.%Y %H:%M:%S',strtotime('13.05.2012 15:31:00'))
where UserId=258070
使用
i
分钟


@MertMermi
%M
代表月名,
%c
代表月名,用数字表示(0,12),
%M
月名也用数字表示(00..12)@MertMermi:
%M
是月名,完整的-请参阅。好的,谢谢,我错编了一个关于php的文档,我想:)
Update `scorelisting` 
set MaxScoreDate=DATE(STR_TO_DATE('13.05.2012 15:31:00','%d.%m.%Y %H:%i:%s')) 
where UserId=258070