Hello everyone,
i currently trying to write a program that will locate a hyphen in a date in the format YYYY-MM-DD this is what i have so far
date = str(raw_input("Enter a date in YYYY-MM-DD format: "))
i = 0
while i < len(date):
if date[i] != "-":
i = i + 1
print date
but all it does is repeat itself and im not even sure if i wrote the program correctly. (by the end of this what i hope to do is add 21 days to whatever the input date is)
ie 2011-03-03 outputs 2011-03-24
hoping for some help, thanks a bunch