Convert To Date Integer - CSharp System

CSharp examples for System:DateTime Convert

Description

Convert To Date Integer

Demo Code


using System.Text;
using System.Collections.Generic;
using System;//w w  w  .  j a  va 2 s .  com

public class Main{
        #endregion

        #region Static
        #region ConvertToDateInteger
        public static int ConvertToDateInteger(DateTime dt)
        {
            return dt.Year * 10000 + dt.Month * 100 + dt.Day;
        }
}

Related Tutorials