Authenticity of the hadith
The hadith you mentioned is not actually a hadith attributed to the Prophet; rather, an athar attributed to ‘Umar ibn Al Khattab without authentication:
Teach your children swimming, archery and horse riding
علموا الاودكم السباحة والرماية وركوب الخيل
It was narrated in Kanz al-Ummal by Al Hindi on the authority of Mak’hool through ibn ‘Umar. It was also mentioned in Fayd Al Qadeer by Al Manawi. Neither authors commented on its authenticity, but also neither attributed this to the Prophet. It was narrated as mawqoof to ‘Umar ibn Al Khattab.
Relevance of horse riding and archery
Having said that, there are other authentic hadiths about horse riding and archery in several contexts.
In this hadith, both archery and horse riding are mentioned in the context of warfare:
حدثنا إبراهيم بن أبي عبلة عن الوليد بن عبد الرحمن الجرشي عن جبير بن نفير عن سلمة بن نفيل الكندي قال كنت جالسا عند رسول الله صلى الله عليه وسلم فقال رجل يا رسول الله أذال الناس الخيل ووضعوا السلاح وقالوا لا جهاد قد وضعت الحرب أوزارها فأقبل رسول الله صلى الله عليه وسلم بوجهه وقال كذبوا الآن الآن جاء القتال ولا يزال من أمتي أمة يقاتلون على الحق ويزيغ الله لهم قلوب أقوام ويرزقهم منهم حتى تقوم الساعة وحتى يأتي وعد الله والخيل معقود في نواصيها الخير إلى يوم القيامة وهو يوحى إلي أني مقبوض غير ملبث وأنتم تتبعوني أفنادا يضرب بعضكم رقاب بعض وعقر دار المؤمنين الشام
“I was sitting with the Messenger of Allah when a man said: ‘O Messenger of Allah! The people have lost interest in horses and put down their weapons, and they say there is no jihad, and that war has ended.’ The Messenger of Allah turned to face him and said: ‘They are lying, now the fighting is to come. There will always be a group among my people who will fight for the truth, for whom Allah will cause some people to deviate, and grant them provision from them, until the Hour comes and until the promise of Allah comes. Goodness is tied to the forelocks of horses until the Day of Resurrection. It has been revealed to me that I am going to die and will not stay long, and you will follow me group after group, striking one another’s necks. And the place of safety for the believers is Ash-Sham.’“
While in this hadith, both archery and horse riding are mentioned in the context pastime:
سمعت رسول الله صلى الله عليه وسلم يقول: إن الله يدخل بالسهم الواحد ثلاثة نفر الجنة: صانعه يحتسب في صنعته الخير، والرامي به ومنبله. وارموا واركبوا، وأن ترموا أحب إلي من أن تركبوا. ومن ترك الرمي بعد ما علمه رغبة عنه فإنها نعمة تركها أو قال: كفرها
I heard the Messenger of Allah saying, “Allah will admit three persons to Jannah for one arrow; the maker who has a good motive in making it, the one who shoots it, and the one who hands it up for shooting. So shoot and ride, but I like shooting more than riding.”
Again in the context of pastime in this hadith, when the Prophet saw some people from Bani Aslam practicing archery as a pastime, he encouraged them:
حدثنا قتيبة بن سعيد حدثنا حاتم عن يزيد بن أبي عبيد عن سلمة بن الأكوع رضي الله عنه قال مر النبي صلى الله عليه وسلم على نفر من أسلم ينتضلون فقال رسول الله صلى الله عليه وسلم ارموا بني إسماعيل فإن أباكم كان راميا ارموا وأنا مع بني فلان قال فأمسك أحد الفريقين بأيديهم فقال رسول الله صلى الله عليه وسلم ما لكم لا ترمون فقالوا يا رسول الله نرمي وأنت معهم قال ارموا وأنا معكم كلكم
The Prophet passed by some persons of the tribe of Aslam practicing archery (i.e. the throwing of arrows) Allah’s Messenger said, “O offspring of Ishmael! Practice archery (i.e. arrow throwing) as your father was a great archer (i.e. arrow-thrower). I am with (on the side of) the son of so-and-so.” Hearing that, one of the two teams stopped throwing. Allah’s Messenger asked them, “Why are you not throwing?” They replied, “O Allah’s Messenger! How shall we throw when you are with the opposite team?” He said, “Throw, for I am with you all.”
The conclusion, and this is purely my opinion, is that pastime beneficial to making Muslims physically or mentally stronger is encouraged by the Prophet (hadith):
عن أبي هريرة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم: المؤمن القوي خير وأحب إلى الله من المؤمن الضعيف وفي كل خير. احرص على ما ينفعك واستعن بالله ولا تعجز. وإن أصابك شيء فلا تقل: لو أني فعلت كان كذا وكذا ولكن قل قدر الله وما شاء فعل فإن لو تفتح عمل الشيطان
Messenger of Allah said, “A strong believer is better and dearer to Allah than a weak one, and both are good. Adhere to that which is beneficial for you. Keep asking Allah for help and do not refrain from it. If you are afflicted in any way, do not say: ‘If I had taken this or that step, it would have resulted into such and such,’ but say only: ‘Allah so determined and did as He willed.’ The word ‘if’ opens the gates of satanic thoughts”.
As for warfare, while it is difficult to imagine in modern times how horse riding and archery may relate, one never knows. All you need is shortage of energy that may, at least partially, render all current warfare equipment of little value. Perhaps then, horse riding and archery will be of value in our times. This is up to you to decide.
I could not find any specific relevance through authentic hadiths to the age ("teach your children"), or to swimming. I hope others may be able to shed some light on these two points.
Other similar hadiths that are not authentic
There were several other hadiths attributed to the Prophet with a similar meaning to your original quote, but not the exact words. None of these hadiths are authentic. Here are some for your reference, in case you come across them elsewhere.
Al Suyuuti mentioned in Al Jamee’ Al Sagheer two similar hadiths. The first being
Teach your sons swimming and archery, and the best pastime for a woman believer in her home is spindling.
علموا أبناءكم السباحة والرماية ونعم لهو المؤمنة في بيتها المغزل
This was narrated on the authority of ibn ‘Ayyash through Saleem ibn ‘Amr Al Ansari through his father through Bakr ibn Abdullah Al Ansari, attributed to the Prophet.. Ibn ‘Ayyash was named as Isma’eel ibn ‘Ayyash in Al Isaaba, and as ‘Ali ibn ‘Ayyash in Al Meezan wa Al Lessan, and as Abu Na’eem ibn ‘Ayyash in Al Ma’refa. Al Dhahabi concluded that the hadith is weak due to ibn ‘Ayyash, being unknown and not trustworthy.
The second hadith is
Teach your children swimming and archery, and the woman spindling.
علموا أبناءكم السباحة والرمي والمرأة المغزل
This hadith was narrated by ‘Abeed Al ‘Attar through ibn ‘Umar, attributed to the Prophet. ‘Abeed Al ‘Attar is considered very weak, and this version is accordingly ruled as very weak, too.
There were other versions through Jabbir ibn ‘Abdullah, Abu Rafee’, and ibn Abi Al Dunya, all of which are weak or worse.