Date Format
Write a program to convert the date from =dd-mm* yy^ prime prime format to "dd/mm/yy^ prime prime format.
dd=0
while(dd<=0 or dd>31):
dd = int(input("Enter Date (1-31): "))
mm=0
while(mm<=0 or mm>12):
mm = int(input("Enter Month (-12): "))
yy = int(input("Enter Year (YYYY): "))
print("\nInput Date : DD/MM/YYYY: %d / %d / %d"%(dd,mm,yy))
print("\nModified Date: MM/DD/YYYY: %d / %d / %d"%(mm,dd,yy))
Comments
Leave a comment