Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

_Zaman's avatar

Date Time value is not showing

I am using Bootstrap DatetimePicker and I can select a date and time.

The problem is when I store the date and time in the database and try to show the value in DateTime Picker text field it's not showing the value. Even it's not showing the manual date time. Why it's not showing??

<div class="input-group date" id="startdate">
    <input type="text" value="2018-11-04 18:27:00" name="startDate" id="start" size="16" class="form-control">
    <span class="input-group-addon">
        <span class="glyphicon-calendar glyphicon"></span>
    </span>
</div>
<div class="input-group date" id="enddate">
    <input type="text" value="{{$meetings->endDate}}" name="endDate" size="16" class="form-control">
    <span class="input-group-addon">
        <span class="glyphicon-calendar glyphicon"></span>
    </span>
</div>
0 likes
1 reply
mballaag's avatar

if you use Mysql the DATETIME - format is YYYY-MM-DD HH:MI:SS. You need to format it on your view or in your controller, before using it in bootstrap. You can use for it Carbon API in your view like that: {{Carbon::createFromFormat('m/d/Y h:i a', $meetings->endDate)}}

Please or to participate in this conversation.