Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
VB6 DateSerial to C#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here DateTime test = DateSerial(2017,14,-3); Console.WriteLine(test); } public static DateTime DateSerial(int year, int month, int day) { if (year < 0) { year = DateTime.Now.Year + year; } else if (year < 100) { year = 1930 + year; } DateTime dt = new DateTime(year, 1, 1); dt = dt.AddMonths(month - 1); dt = dt.AddDays(day - 1); return dt; } } }
run
|
edit
|
history
|
help
0
6. Parallelism: threads
bla bla
Pizzas&Tuples&Golden-Medal
test_hash
2.1.1 Basic types: Lists and Linq - caveat
sgshdfhdfhfdh
aa
InvokeProgram
Print Matrix To Screen (with little pretty box)
532