# Inserting usable timestamps in Mongo

**URL:** <https://community.dreamfactory.com/t/inserting-usable-timestamps-in-mongo/546>\
**Category:** Connecting to NoSQL\
**Created:** [November 13, 2014, 11:20pm UTC](https://community.dreamfactory.com/t/inserting-usable-timestamps-in-mongo/546 "2014-11-13T23:20:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![hijakk](https://avatars.discourse-cdn.com/v4/letter/h/59ef9b/32.png) [@hijakk](https://community.dreamfactory.com/u/hijakk)\
**Post date:** [November 19, 2014, 5:36pm UTC](https://community.dreamfactory.com/t/inserting-usable-timestamps-in-mongo/546/7 "2014-11-19T17:36:23Z")

</div>

Apologies, I didn’t get an email update when the last comment happened  
I was using the dreamfactory swagger API interface and attempting to do exactly

```
POST https://localhost:443/rest/test_app_mongo/appointment
{"next_appointment":new Date("2014-11-15T17:30:00")}

```

Which comes back with:

```
{
  "error": [
    {
      "message": "JSON Error: Syntax error, malformed JSON",
      "code": 500
    }
  ]
}

```

I hadn’t run into documentation on the record wrapper, so I think that’s what I was looking for. I’m still not exactly sure, though, as running through the swagger API interface I’m posting

```
POST https://localhost:443/rest/test_app_mongo/appointment
{"record":[{"name":"test", "next_appointment":new Date("2014-11-15T17:30:00")}]}

```

and I’m getting back a 500 of malformed JSON, still:

```
{
  "error": [
    {
      "message": "JSON Error: Syntax error, malformed JSON",
      "code": 500
    }
  ]
}

```

It’s looking like we’re probably going to just use device based milisecond encoded dates, but this is nagging at me a bit.

---

_[View the full topic](https://community.dreamfactory.com/t/inserting-usable-timestamps-in-mongo/546)._
