Python Forum
Reset counter when the day turns over
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reset counter when the day turns over
#4
Ok, then I guess keep track of what day it was the last time you incremented, and if it's different, reset the counter? datetime.date.today().day would be what day of the month it is. https://docs.python.org/3/library/dateti...date.today
Reply


Messages In This Thread
Reset counter when the day turns over - by Rehan11 - Dec-28-2018, 03:55 PM
RE: Reset counter when the day turns over - by nilamo - Jan-03-2019, 05:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a sequential number (counter) and reset at each duplicate Mekala 0 1,784 Sep-20-2020, 05:02 AM
Last Post: Mekala
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 2,917 Jun-18-2020, 04:59 PM
Last Post: QTPi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020