Get Date Time Of Day - CSharp System

CSharp examples for System:DateTime Day

Description

Get Date Time Of Day

Demo Code


using System.Globalization;
using System.Text.RegularExpressions;
using System.Web;
using System.Linq;
using System.Collections.Generic;
using System;/*from w  w  w  . ja va  2 s . com*/

public class Main{
            public static string GetDateTimeOfDay(int relativeday)
            {
                return DateTime.Now.AddDays(relativeday).ToString("yyyy-MM-dd HH:mm:ss");
            }
}

Related Tutorials