Specializations

Sunday, August 10, 2014

how can we get duration using c#.net

 private int GetDuration(DateTime startDate, DateTime endDate)
        {
            try
            {
                return (int)Math.Round((endDate - startDate).TotalMilliseconds);
            }
            catch (Exception ex)
            {
                ex.ErrorLogger();
                return 0;
            }
        }

No comments:

Post a Comment