# MongoDB to DreamFactory translation of Date values

**URL:** https://community.dreamfactory.com/t/mongodb-to-dreamfactory-translation-of-date-values/208
**Category:** Connecting to NoSQL
**Created:** [July 25, 2014, 2:38am UTC](https://community.dreamfactory.com/t/mongodb-to-dreamfactory-translation-of-date-values/208 "2014-07-25T02:38:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alan\_gruskoff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/alan_gruskoff/32/74_2.png) [@alan\_gruskoff](https://community.dreamfactory.com/u/alan_gruskoff)
#### Post date: [July 25, 2014, 2:38am UTC](https://community.dreamfactory.com/t/mongodb-to-dreamfactory-translation-of-date-values/208/1 "2014-07-25T02:38:51Z")

</div>

Apparently, there is a MongoDB to DreamFactory translation of Date data going on.

On my MongoLab data, a Date looks like this:

````auto
"GameDate": {
           "$date": "2014-09-20T00:00:00.000Z"
}```

When I read this data in with AngularJS via DreamFactory, I get back a Date object that looks like:
```Object {sec: 1409184000, usec: 0}``` 

For which the 10 digit "sec"onds value represents the JavaScript date:
Fri Jan 16 1970 23:26:24 GMT-0800 (PST), about 44 years off.

How do I format a real Date with this MongoDB Date data and more so, how do I post a valid Date using the DreamFactory methods?

Thanks for any clues I can use.
````

---

<div class="post-metadata">

### Author: ![benbusse](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/benbusse/32/4_2.png) [@benbusse](https://community.dreamfactory.com/u/benbusse)
#### Post date: [July 26, 2014, 6:34am UTC](https://community.dreamfactory.com/t/mongodb-to-dreamfactory-translation-of-date-values/208/2 "2014-07-26T06:34:24Z")

</div>

Hey Alan, sorry for the delay. We’re looking into this (saw your support request too). Mark will be in touch by Monday and we’ll post an answer here as well.

---

<div class="post-metadata">

### Author: ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)
#### Post date: [July 27, 2014, 9:01pm UTC](https://community.dreamfactory.com/t/mongodb-to-dreamfactory-translation-of-date-values/208/3 "2014-07-27T21:01:17Z")

</div>

Alan,

My apologies for the delayed response. One of our engineers is looking into this right now, so I’ll get right back with you as soon I have a solid answer. For now though, have a look at these couple of posts I saw on stack:

[MongoDB ISO Timedate](http://stackoverflow.com/questions/20822085/mongodb-iso-datetime)

[Storing Dates in Mongo and using in AngularJS](http://stackoverflow.com/questions/22824915/how-to-store-dates-in-mongodb-and-use-them-in-angularjs)

If you haven’t seen these already, they may be able to provide a bit of insight. Note that this issue is related to both angular and jquery.

I’ll be back in touch shortly.

Thanks,

- Mark
