C# time difference between two times


       DateTime dtFrom = DateTime.Parse("3:00 PM");  
       DateTime dtTo = DateTime.Parse("5:00 PM");  
       DateTime now = DateTime.Now;  
       if ((now>=dtFrom) && now<= dtTo )  
       {  
       // Do Something  
       }  


Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report