Found in Sahih Bukhari #5891 and Sahih Muslim #257, the hadith below suggest it is Sunnah to trim one's moustache:
عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ " الْفِطْرَةُ خَمْسٌ الْخِتَانُ، وَالاِسْتِحْدَادُ، وَقَصُّ الشَّارِبِ، وَتَقْلِيمُ الأَظْفَارِ، وَنَتْفُ الآبَاطِ ".
Narrated Abu Huraira: I heard the Prophet (ﷺ) saying. "Five practices are characteristics of the Fitra: circumcision, shaving the pubic hair, cutting the moustaches short, clipping the nails, and depilating the hair of the armpits."
The hadith below found in Sahih Muslim #258 suggests one should do it no longer than every 40 days.
عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ أَنَسٌ وُقِّتَ لَنَا فِي قَصِّ الشَّارِبِ وَتَقْلِيمِ الأَظْفَارِ وَنَتْفِ الإِبْطِ وَحَلْقِ الْعَانَةِ أَنْ لاَ نَتْرُكَ أَكْثَرَ مِنْ أَرْبَعِينَ لَيْلَةً .
Anas reported: A time limit has been prescribed for us for clipping the moustache, cutting the nails, plucking hair under the armpits, shaving the pubes, that it should not be neglected far more than forty nights.
In order to trim one's moustache, he must first have a moustache. However, how thick does the moustache have to be in order to trim it?
A male starts growing a moustache during puberty so if one is growing their moustache at this age, it would not be that thick and they could barely trim it.
They wouldn't have a full moustache yet and would have to wait a couple of years until it has grown thick and this therefore means they won't be trimming their moustache every 40 days because they are still growing it. This henceforth raises the question:
When is it required for a man to start trimming his moustache?