The setting’s a little buried, but the trick is to know that the clock is a system icon. If you search Windows for the specific phrase — system icon — you’ll find the setting.
For example, you asked about Windows 10: Type system icon in the search box, and you’ll see an option to “Turn system icons on or off.” Click that, and you’ll be brought right to the page where you can then turn the clock icon off
System icons controls in Windows 10.
It’s similar in Windows 7: Enter system icon in the search box, select “Remove icons from notification area…”, and you’ll be brought to the page where you can turn off the clock icon.
how to disable taskbar clock windows 10
How to Hide Time in Taskbar Windows 10
taskbar disappeared windows 10
windows 10 task manager not working
How to Hide Clock in Taskbar Windows 10