I have had a gym for about a week now and was wondering if there was somewhere i could see how long my Pokemon has been there for.
With the new gym rework, there is now a way to see how long your pokemon has been defending a gym. If you go to the gym with your pokemon in it and click on your pokemon like you are going to feed it berries, near the top right of the screen will be three small symbols with labels. One is number of battles won, one is length of time since you put the pokemon in the gym, and the last will be the number of berries the pokemon has been fed since being placed in the gym.
These symbols should be labeled, but if not, the battles symbol looks like two pokeballs with the "POW!" background, i believe the length of time is a shield symbol, and the berries fed symbol looks like a Razzberry. They should also be in that order, from left to right.
There is no built-in feature that would track that. The game, at least at launch, had plenty of stability issues, adding these purely informative yet irrelevant features would only add to the workload of the servers.
A workaround to this would be naming a pokemon the current time and date, then putting it in a gym. When you check a gym's status where your pokemon is still standing, you can do some basic math and figure out how long a pokemon has been in there.
No, this is not currently a feature in the game.
However, using some common sense, you could always estimate this yourself. It heavily depends on how often you play, myself I check on the app every half hour to an hour, but you can simply record the date/time of when you add a Pokemon to a Gym then the next time you see him in your Pokemon list again, get the new date/time.
I did this with a Gym out in the middle of nowhere because I was curious how long I could hold it, but it was only a sad 2 days 12 hours.