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

        <bdo id='1h2A7'></bdo><ul id='1h2A7'></ul>

        <small id='1h2A7'></small><noframes id='1h2A7'>

        <tfoot id='1h2A7'></tfoot>

        <legend id='1h2A7'><style id='1h2A7'><dir id='1h2A7'><q id='1h2A7'></q></dir></style></legend>
      1. 如何在laravel中通过Vuejs Datepicker格式化接收日期

        How to format date receiving through Vuejs Datepicker in laravel(如何在laravel中通过Vuejs Datepicker格式化接收日期)
      2. <tfoot id='KHX35'></tfoot>

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

          <tbody id='KHX35'></tbody>

        <legend id='KHX35'><style id='KHX35'><dir id='KHX35'><q id='KHX35'></q></dir></style></legend>
          1. <i id='KHX35'><tr id='KHX35'><dt id='KHX35'><q id='KHX35'><span id='KHX35'><b id='KHX35'><form id='KHX35'><ins id='KHX35'></ins><ul id='KHX35'></ul><sub id='KHX35'></sub></form><legend id='KHX35'></legend><bdo id='KHX35'><pre id='KHX35'><center id='KHX35'></center></pre></bdo></b><th id='KHX35'></th></span></q></dt></tr></i><div id='KHX35'><tfoot id='KHX35'></tfoot><dl id='KHX35'><fieldset id='KHX35'></fieldset></dl></div>
                  <bdo id='KHX35'></bdo><ul id='KHX35'></ul>
                  本文介绍了如何在laravel中通过Vuejs Datepicker格式化接收日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在用 Laravel 作为后端在 Vuejs 中构建一个应用程序.我正在使用 datepicker 在列中添加日期.我收到错误

                  I'm building an application in Vuejs with Laravel as backend. I'm using datepicker to add dates in column. I'm getting an error of

                  无效的日期时间格式:1292 不正确的日期时间值:'2017-05-04T18:30:00.000Z' 列'schedule' 在第 1 行

                  Invalid datetime format: 1292 Incorrect datetime value: '2017-05-04T18:30:00.000Z' for column 'schedule' at row 1

                  我正在发送请求中的日期:

                  I'm sending the date in request:

                  在 laravel 中执行 dd 时,我得到了:

                  And while doing dd in laravel I'm getting:

                  有人可以指导我如何实现这一目标.

                  Can someone guide me how to achieve this.

                  推荐答案

                  你可以使用 Carbon 解析日期并相应地格式化

                  You could use Carbon to parse the date and format it accordingly

                  $mydate = '2017-05-04T18:30:00.000Z'; // $request->schedule
                  
                  $parsed_date = CarbonCarbon::parse($mydate)->toDateTimeString();
                  

                  这篇关于如何在laravel中通过Vuejs Datepicker格式化接收日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                          <tbody id='NIcYX'></tbody>
                        <tfoot id='NIcYX'></tfoot>

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

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