I want to get the 12 hours from the current time.
when i try this:
# Set the date and time row current_time = time.time() # now (in seconds) half_hour = current_time + 60*30 # now + 30 minutes one_hour = current_time + 60*60 # now + 60 minutes for t in [current_time,half_hour,one_hour]: if (0 <= datetime.datetime.now().minute <= 29): self.getControl(346).setLabel(time.strftime("%I" + ":30%p",time.localtime(t)).lstrip("%p")) else: self.getControl(346).setLabel(time.strftime("%I" + ":30%p",time.localtime(t)).lstrip("0")) it will not get the hour from the current time to add the hours, as because i'm using time.strftime("%I"
I want to get the hours from the current time to get the hours and add the hours.
The return output would be:
7 I want to get the hours from the current time so i could then add the hours forward from the current time.
Can you show me of example how I can get the hours from current time without the 20150511070000?
1not131or whatever it is from the current time using 12 hour?