Trim Minutes - CSharp System

CSharp examples for System:DateTime Minute

Description

Trim Minutes

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*from www  .j a v  a 2s . c  om*/

public class Main{
        public static DateTime TrimMinutes(this DateTime d)
        {
            return new DateTime(d.Year, d.Month, d.Day, d.Hour, 0, 0, 0);
        }
}

Related Tutorials