Get First Day Of Month - CSharp System

CSharp examples for System:DateTime Month

Description

Get First Day Of Month

Demo Code


using System;//from  w w  w  .  ja  va 2  s  .com

public class Main{
        public static DateTime GetFirstDayOfMonth(this DateTime datetime) {
            return new DateTime(datetime.Year, datetime.Month, 1);
        }
}

Related Tutorials