Can unix timestamp be used as field in date histogram?

I guess you could try the "script" histogram facet :

"facets" : {
"histo1" : {
"histogram" : {
"key_script" : "doc['date'].date.minuteOfHour",
"value_script" : "doc['num1'].value",
}
}
}

I tried a couple of things myself, didnt work. Can you please suggest?