Discard Day Time - CSharp System

CSharp examples for System:DateTime Day

Description

Discard Day Time

Demo Code

// (c) Copyright Microsoft Corporation.
using System.Windows.Markup;
using System.Windows;
using System.Globalization;
using System.Diagnostics;
using System;/*from w  w w  . j a v a2s  . c o  m*/

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

Related Tutorials