Answers for "time stamp in c#"

C#
0

c# timestamp now

DateTime now = DateTime.Now;
        Console.WriteLine("NOW: " + now);
Posted by: Guest on January-18-2021
0

c# timestamp

public static String GetTimestamp(DateTime value)
{
    return value.ToString("yyyyMMddHHmmssffff");
}
//  ...later on in the code
String timeStamp = GetTimestamp(new DateTime());
Console.WriteLine(timeStamp);
Posted by: Guest on October-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language