Reset a certain variable daily

Good morning all I have some variables in my program to track how may parts are done per day and all time parts done. I was curious if there was a way in which I could automatically have the daily parts variable reset to zero while storing that past days value in a temporary variable which gets saved over by the next days amount?

Thank you!