Decade Of Date - CSharp System

CSharp examples for System:DateTime Calculate

Description

Decade Of Date

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 va2 s.c  o  m*/

public class Main{
        public static int DecadeOfDate(DateTime date)
        {
            return date.Year - (date.Year % 10);
        }
}

Related Tutorials