How to get date and time of uploaded firmware?
Since Arduino typically does a full recomple you can use the macros __DATE__ and __TIME__ in your code where you would use a quoted string.
Eg, client.println(&quot;Built &quot; __DATE__)
Or whatever you want to do with the information.
If the source file this appears in does not get rebuilt, it will not update, so in other environments you may need a custom build rule to force that.  Check stackoverflow where you will find many questions and answers on various forms of this.
It can be useful to capture the git hash and clean/dirty state, too.