Hi Tania,
This question came up quite a few times on customer sites. You need to define exactly what you mean by "used", but it will normally be either the last time a new version was created in the project or the last time a package was created, promoted or demoted. Detecting the last time code was checked-out for browse is not possible AFAIK.
Here is a quick query that will list all projects with packages created in the last two months:
select distinct e.environmentname from harenvironment e, harpackage p where p.envobjid=e.envobjid and p.creationtime > sysdate-62;
If you want to get the last time, you can simply do a max() on the creationtime (or execdtime for promotes/demotes) and tie the envobjid back to the project you want to examine.
Let me know if you need more help and I will try and write some examples for you.
Best regards,
Robert