Ti SDK & ACS vers. 3.2.2
I'm trying to query a Date of a custom_fields property (for ACS Post Obj), the documentation mentions that the string in the format: '2014-06-08 04:00:00 +0000'
, would convet to a Date.
After settings a date, I truly see the 'String'
being converted to a Date
Object (I also notice from the T in the middle which was not sent in my String).
Structure of my Post ACS:
content = "dlksdkfjn" created_at = "2014-06-06T18:09:51+0000" custom_fields = (Object)#1 postType = 2 releaseDate = "2014-06-08T04:00:00+0000" // TODO query with $gte id = "539203xxxXXxxXX11a7e" title = "My Date Playrr" updated_at = "2014-06-06T18:17:49+0000"When I try to Query:
var now = moment().format("YYYY-MM-DDTHH:mm:ssZ"); Ti.API.info('Now: ' + now); Cloud.Posts.query({ limit: 10, where: { 'releaseDate': { '$gt': now } } // hmmm...? }, function (e) { if (e.success) { alert('Success:\n' + 'Count: ' + e.posts.length); } else { alert('Error:\n' + (e.error && e.message)); } });