Kibana, getting todays date

I tried that and I also did
(new Date().getTime()) - doc['duedate'].value()
Tried to represent as Number String and date nothing. Both give me 0 results on visualization. But I can get results for new Date().getTime()