simeon3000

999DaysAfterBirth

May 27th, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1.           string dateTime = Console.ReadLine();
  2.           string format = "dd-MM-yyyy";
  3.           DateTime dt = DateTime.ParseExact(dateTime, format, null);
  4.  
  5.           dt = dt.AddDays(999);
  6.  
  7.           Console.WriteLine(dt.ToString(format));
Advertisement
Add Comment
Please, Sign In to add comment