if this double refers to the old DATE type, you can do something likeDateTime dt = new DateTime(1899,12,30);
dt = dt.AddDays(5.875); //replace 5.875 with appropriate double value
Console.WriteLine(dt.ToString());

解决方案 »

  1.   

    记得好象Dobule可以用来计算从1970-01-01后的毫秒数,好象是有一个函数可以进行转换的.不好意思,只是我没用过.
      

  2.   

    你想用double表示什么,毫秒、秒、分钟、小时、天???
      

  3.   

    哎,就是不了解喽。。
    以前VB用得特爽。。
    sTerm0 = DateAdd("s", D2 - D1, DateAdd("s","1990-6-1 0:0" , "1970-1-1 0:0"))
    sTerm1 = Format(sTerm0, "yyyy/mm/dd")
    sTerm1就可以得到一个日期了。。
    现在的关键,C#中也同样通过一个逻辑计算,得到一个秒的double值,如何将此double值变成日期呢??
    我只需由double变成DateTime!
      

  4.   

    use DateTime's AddSeconds methodDateTime dt = new DateTime(1990,6,1);
    dt = dt.AddSeconds(10000); 
    Console.WriteLine(dt.ToString());