I m working on my Python script to get the hours time.
When my current time is 8:30PM, I want to know how I can add the hour forward in the labels which it will be 9:00PM, 9:30PM?
Here is for example:
if (0 <= datetime.datetime.now().minute <= 29): self.getControl(4203).setLabel(time.strftime("%I").lstrip( 0 ) + :00 + time.strftime("%p")) self.getControl(4204).setLabel(time.strftime("%I").lstrip( 0 ) + :30 + time.strftime("%p")) self.getControl(4205).setLabel(time.strftime("%I").lstrip( 0 ) + :00 + time.strftime("%p")) else: self.getControl(4203).setLabel(time.strftime("%I").lstrip( 0 ) + :30 + time.strftime("%p")) self.getControl(4204).setLabel(time.strftime("%I").lstrip( 0 ) + :00 + time.strftime("%p")) self.getControl(4205).setLabel(time.strftime("%I").lstrip( 0 ) + :30 + time.strftime("%p"))
When my current time is between 8:30PM and 8:59PM, the label with id 4203 will show 8:30PM, the label with id 4204 will show 8:00PM and the label with id 4205 will show 8:30PM. I want the labels to be display to something is like 8:30PM, 9:00PM and 9:30PM.
Can you please tell me how I can add the one hour forward for the labels following with ids 4204 and 4205?