Node.js Google云端平台数据存储date比较

我想使用gcloud.js模块在Google Datastore上运行查询:

var startDate = moment('2016-03-11').format('YYYY-MM-DD'); var query = exports.dataset.createQuery('Resource') .filter('startDate', '>=', startDate); exports.dataset.runQuery(query, function(err, resources) { console.log(resources); }); 

此date比较filter不工作,显示所有可能的实体。 其他filtertypes工作得很好。

我不知道我应该通过哪种格式的date。 尝试几乎所有可能的格式。 也许比较运算符的date应该是不同的?

问题在于variablestypes。 它不能是一个string,它将被parsing为Date:

 .filter('startDate', '>=', new Date(startDate)); 

现在一切都像魅力一样。