How to calculate timestamp difference in logstash config file?

Parse them both using date filters, then use ruby to calculate the difference. Something like this.