@tamarissa: You got a response fro @chaley, but, I'd looked at it a bit in that time and had a different response, and a question, so...
That template you have is only looking at the first format returned in the list. I think the following is closer to what you want:
Code:
{:'list_re(formats_modtimes('yyyy-MM-dd'), ',', '^(EPUB|AZW).*', '')'}
That gives results like:
Code:
EPUB:2018-09-02, AZW3:2018-07-22
EPUB:2016-01-14
What you do after that depends on what you want. If you just want the ePub date, the @chaley's answer is the best one. But, do you just want the first of these? Or the oldest? Or do you want the EPUB date if both formats exist? The date from the first format added?
The real question is: What are you trying to achieve? The file modification date will change as you do things. If you do a conversion, edit the book or use Embed metadata to update the metadata, then the file modification will change. Because of that, I don't know what use this actually is in the day-to-day book management.