---
# System prepended metadata

title: '[laravel][datetime]將從資料庫取出的日期資料格式化'
tags: [php, laravel, datetime]

---

# [laravel][datetime]將從資料庫取出的日期資料格式化
###### tags: `laravel`,`php`,`datetime`

https://stackoverflow.com/questions/1535246/format-date-from-database

view
```htmlmixed!
 @foreach ($items as $item)
<div>日期: {{ date('yy/m/d h:mA', strtotime($item["created_at"])) }}</div>
  @endforeach

```