Advertisement
Guest User

Untitled

a guest
Oct 12th, 2016
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace _01_DayOfWeek
  9. {
  10.     class DayOfWeek
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             string dateAsText = Console.ReadLine();
  15.             DateTime date = DateTime.ParseExact(dateAsText, "d-m-yyyy", CultureInfo.InvariantCulture);
  16.             Console.WriteLine(date.DayOfWeek);
  17.             //string dateAsText = Console.ReadLine();
  18.             //DateTime date = DateTime.ParseExact(dateAsText, "d-M-yyyy", CultureInfo.InvariantCulture);
  19.             //Console.WriteLine(date.DayOfWeek);
  20.  
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement