CSharp examples for System:DateTime Convert
Convert this to integer
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w w w .ja v a 2 s.c om*/ public class Main{ /// <summary> /// Convert this to integer /// </summary> /// <param name="date">this date to convert</param> /// <returns>this as YYYYMMDD</returns> public static int ToInt(this DateTime date) { return (date.Year * 100 + date.Month) * 100 + date.Day; } }