TimeSpan.TicksPerDay : TimeSpan : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » TimeSpan »

 

TimeSpan.TicksPerDay








    
 

using System;
using System.Globalization;

class MainClass {
    public static void Main() {
        // Create some date/time objects
        DateTime dt = new DateTime();
        DateTime dt1 = new DateTime(2001, 12, 31);
        DateTime dt2 = new DateTime(2000, 12, 31, 23, 59, 59);

        // Do some date time math
        DateTime today = DateTime.Today;
        today = today + new TimeSpan(TimeSpan.TicksPerDay);
        Console.WriteLine("Tomorrow is: {0}", today.ToString());
        today = DateTime.Today - new TimeSpan(7 * TimeSpan.TicksPerDay);
        Console.WriteLine("Last Week on this day it was: {0}",today.ToString());
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» TimeSpan