Trim Months - CSharp System

CSharp examples for System:DateTime Month

Description

Trim Months

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from ww w.  j ava2s .  com

public class Main{
        public static DateTime TrimMonths(this DateTime d)
        {
            return new DateTime(d.Year, 1, 1, 0, 0, 0, 0);
        }
}

Related Tutorials