Question: I'm receiving dates from my database in the format `2018-08-08 15:38:48` however I want it to show `3:38 pm` instead. 

I'm just unsure when to make this change, can I change it while it is being posted? They are dates of messages being sent to a person.

**Current code:** 

```
<div v-for="messages in userMessages">
   <div class="date">
       {{ user.created_at }}
   </div>
</div>

```

**Output:**

```
2018-08-08 15:38:48

```

How do I transform the date in vue? (when it is in a v-for?)

Answer: 
Vue does not offer date formatting. You will need your own filter to format the date. Or you use a package like the following: <https://github.com/brockpetrie/vue-moment#readme>

```
<span>{{ someDate | moment("hh:mm a") }}</span>

```
<https://momentjs.com/>

How do you use it?

You can use like this.

```
moment('2018-08-08 15:38:48').format('LTS'); // 03:38:48 PM

```