Learning: Tkinter & datetime

I thought I’d try to create a time counter using tkinter and datetime modules.

The idea was to get an input of the age and then calculate the age, with a live counter showing Hours, minutes and seconds.

The stupid that I am I just went straight ahead into the coding part, doing the “import …..” thing. Only to realize later that I knew absolutely nothing about both the modules. and I started randomly clicking away Urls to read and get a feel for it. After an hour and a half of Googling and reGoogling all related phrases that came to my mind. I was left more clueless.

Purely  by chance, I stumbled onto python documentation for datetime and Tkinter. And dismissed it as useless. I wouldn’t find a chair if it hit me in my face. I spent another fruitless hour of trying to tinker with the things I know. Somehow, got myself scrolling through my history, and rediscovered it. It is one goldmine of information it had almost everything that I needed and I got right into it.

Took me about six hours to complete this super simple program. Which looked something like this,

wasted time counter

Considering, That this is my first one, from the ground up. I’m not that embarassed of myself.

I created a github repo.


  • Always read the official documentation, before getting your hands dirty. It’s lot less of a hassle.
  • Random websites explaining stuff are mostly shit.