Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Date and time of today in C#

DateTime.Today will yield today's date and time.

  1. using System;
  2.  
  3. namespace forgetCode
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. Console.WriteLine(DateTime.Today);
  10. }
  11.  
  12. }
  13. }


Output:
21-07-2012 00:00:00

..