How to convert two dates to millis by using clock component?

And please don’t duplicate topics.