Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
DateTime
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { DateTime mydata =DateTime.Now; //Your code goes here Console.WriteLine(mydata); Console.WriteLine(mydata.ToShortDateString()); Console.WriteLine(mydata.ToShortTimeString()); Console.WriteLine(mydata.ToLongDateString()); Console.WriteLine(mydata.ToLongTimeString()); Console.WriteLine(mydata.AddMonths(4).ToShortDateString()); DateTime test =DateTime.Parse("2021/09/01"); TimeSpan timemoves = DateTime.Now.Subtract(test); Console.WriteLine(timemoves.TotalDays); } } }
run
|
edit
|
history
|
help
0
WhereEnumerator
Valid Substring
ss
a.i. neural framework / J.A.R.V.I.S. / Just A Rather Very Intelligent System
13
double to hex to double lose precision
Intuit // C# // listing_4.4 (StreamReader // output.txt + Convert/Parse)
Testing 12
walle
services