<legend id='3iOGj'><style id='3iOGj'><dir id='3iOGj'><q id='3iOGj'></q></dir></style></legend>

    <bdo id='3iOGj'></bdo><ul id='3iOGj'></ul>

<small id='3iOGj'></small><noframes id='3iOGj'>

  1. <i id='3iOGj'><tr id='3iOGj'><dt id='3iOGj'><q id='3iOGj'><span id='3iOGj'><b id='3iOGj'><form id='3iOGj'><ins id='3iOGj'></ins><ul id='3iOGj'></ul><sub id='3iOGj'></sub></form><legend id='3iOGj'></legend><bdo id='3iOGj'><pre id='3iOGj'><center id='3iOGj'></center></pre></bdo></b><th id='3iOGj'></th></span></q></dt></tr></i><div id='3iOGj'><tfoot id='3iOGj'></tfoot><dl id='3iOGj'><fieldset id='3iOGj'></fieldset></dl></div>

      <tfoot id='3iOGj'></tfoot>

      mysql时间戳转换/格式化注意:遇到格式不正确的数值

      mysql timestamp conversion/formatting Notice: A non well formed numeric value encountered(mysql时间戳转换/格式化注意:遇到格式不正确的数值)
        <tbody id='K6QHg'></tbody>

          <i id='K6QHg'><tr id='K6QHg'><dt id='K6QHg'><q id='K6QHg'><span id='K6QHg'><b id='K6QHg'><form id='K6QHg'><ins id='K6QHg'></ins><ul id='K6QHg'></ul><sub id='K6QHg'></sub></form><legend id='K6QHg'></legend><bdo id='K6QHg'><pre id='K6QHg'><center id='K6QHg'></center></pre></bdo></b><th id='K6QHg'></th></span></q></dt></tr></i><div id='K6QHg'><tfoot id='K6QHg'></tfoot><dl id='K6QHg'><fieldset id='K6QHg'></fieldset></dl></div>
            <bdo id='K6QHg'></bdo><ul id='K6QHg'></ul>

              <legend id='K6QHg'><style id='K6QHg'><dir id='K6QHg'><q id='K6QHg'></q></dir></style></legend>

              <small id='K6QHg'></small><noframes id='K6QHg'>

                <tfoot id='K6QHg'></tfoot>
                本文介绍了mysql时间戳转换/格式化注意:遇到格式不正确的数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在我的数据库中,我已将已发布"行设置为时间戳,但在尝试对其进行转换/格式化时收到此通知:

                In my database I have set row "posted" as a timestamp but I get this notice when trying to convert/format it:

                Notice: A non well formed numeric value encountered
                

                代码:

                $posted = date('d/m/Y H:i:s', $row['posted']);
                    echo $posted;
                

                我做错了什么?

                推荐答案

                这意味着 date() 的第二个参数是整数,所以转换 $row['posted'] 先打时间戳.

                This means that the second parameter for date() is expecting integer, so convert $row['posted'] to timestamp first.

                试试

                $posted = date('d/m/Y H:i:s', strtotime($row['posted']));
                

                这篇关于mysql时间戳转换/格式化注意:遇到格式不正确的数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                datetime to timestamp(日期时间到时间戳)
                PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)
                  <tbody id='8Jd8N'></tbody>
                • <i id='8Jd8N'><tr id='8Jd8N'><dt id='8Jd8N'><q id='8Jd8N'><span id='8Jd8N'><b id='8Jd8N'><form id='8Jd8N'><ins id='8Jd8N'></ins><ul id='8Jd8N'></ul><sub id='8Jd8N'></sub></form><legend id='8Jd8N'></legend><bdo id='8Jd8N'><pre id='8Jd8N'><center id='8Jd8N'></center></pre></bdo></b><th id='8Jd8N'></th></span></q></dt></tr></i><div id='8Jd8N'><tfoot id='8Jd8N'></tfoot><dl id='8Jd8N'><fieldset id='8Jd8N'></fieldset></dl></div>

                      • <bdo id='8Jd8N'></bdo><ul id='8Jd8N'></ul>
                        <tfoot id='8Jd8N'></tfoot>
                        1. <small id='8Jd8N'></small><noframes id='8Jd8N'>

                          <legend id='8Jd8N'><style id='8Jd8N'><dir id='8Jd8N'><q id='8Jd8N'></q></dir></style></legend>