ellapt

T14.17.PrintDateBG

Feb 3rd, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4. class PrintDateBG
  5. {
  6. static void Main()
  7. {
  8. Console.WriteLine("Print date and time after 6h 30min and the day of week in Bulgarian\n");
  9.  
  10. string dateStr = "24.01.2013 23:00:00";
  11. Console.WriteLine("Date and time given: {0}", dateStr);
  12.  
  13. DateTime dateParsed = DateTime.ParseExact(dateStr, "dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture);
  14.  
  15. dateParsed = dateParsed.AddHours(6.5);
  16.  
  17. Console.WriteLine("{0} {1}", dateParsed.ToString("dddd", new CultureInfo("bg-BG")), dateParsed);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment