Hi wondering how to create a timestamp in c# using Datetime values, use the method below. public static String GetTimestamp(this DateTime value)
{
return value.ToString("yyyyMMddHHmmssffff");
}
Posts on .Net technology by Yasser R Shaikh. We have moved : http://yassershaikh.com/
Hi wondering how to create a timestamp in c# using Datetime values, use the method below. public static String GetTimestamp(this DateTime value)
{
return value.ToString("yyyyMMddHHmmssffff");
}
string[] arr = new string[4];arr[0] = "000";arr[1] = "111";arr[2] = "222";arr[3] = "333"; Array.Clear(arr, 0, arr.Length);Here I am limiting the decimal places to 3 in a double.
double old_value = 3.142356;double new_value = Math.Round(old_value, 3);
:)
2011 ·Code-Studio by yrus.