Using Python Script we add and subtract the Dates in VMS platform
#----------------------------- # Adding to or Subtracting from a Date # Use the rather nice datetime.timedelta objects now = datetime.date(2003, 8, 6) difference1 = datetime.timedelta(days=1) difference2 = datetime.timedelta(weeks=-2) print "One day in the future is:", now + difference1 #=> One day in the future is: 2003-08-07 print "Two weeks in the past is:", now + difference2 #=> Two weeks in the past is: 2003-07-23 print datetime.date(2003, 8, 6) - datetime.date(2000, 8, 6) #=> 1095 days, 0:00:00 #----------------------------- birthtime = datetime.datetime(1973, 01, 18, 3, 45, 50) # 1973-01-18 03:45:50 interval = datetime.timedelta(seconds=5, minutes=17, hours=2, days=55) then = birthtime + interval print "Then is", then.ctime() #=> Then is Wed Mar 14 06:02:55 1973 print "Then is", then.strftime("%A %B %d %I:%M:%S %p %Y") #=> Then is Wednesday March 14 06:02:55 AM 1973 #----------------------------- when = datetime.datetime(1973, 1, 18) + datetime.timedelta(days=55) print "Nat was 55 days old on:", when.strftime("%m/%d/%Y").lstrip("0") #=> Nat was 55 days old on: 3/14/1973