"To the Virgins" follows the theme of Carpe Diem, which means to seize the day. Take advantage of what you can, while you can. He urges youth to do all they can while they are young, because once that youth is gone, there is no going back. They will never be able to do those youthful things later in life. They don't know how long they will live, either. This part of "To the Virgins" is similar to the theme of "To Daffodils."
"To Daffodils" uses that same theme, but doesn't directly urge the reader to take advantage of the time. It is assumed. He simply states that we all don't know how long we'll live, but we all will die. Of that, we are certain.
"We have short time to stay, as you,
We have as short a spring;
As quick a growth to meet decay,
As you, or anything.
They are similar in their themes, yet the first poem (Virgins) directly offers words of advice to the youth.
"Gather ye Rose-buds while ye may,
Old Time is still a flying:
And this same flower that smiles to day,
To morrow will be dying."
The second one (Daffodils) doesn't come out directly and tell the reader to take advantage. It's implied because we all will eventually die.