时间转换

DateTime dt = new DateTime(1970, 1, 1);

                dt = dt.AddMilliseconds(long.Parse(textBox1.Text));

                dt = dt.ToLocalTime();

                richTextBox1.Text= dt.ToString("yyyy-MM-dd HH:mm:ss");

posted @ 2015-07-30 09:06  秦小米  Views(159)  Comments(0Edit  收藏  举报