c# DateTime 与UNIX时间戳转换

简介:

1311249000=2011-07-21 11:50:00:

new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(1311249000).ToString("yyyy-MM-dd HH:mm:ss")

 




本文转自94cool博客园博客,原文链接http://www.cnblogs.com/94cool/archive/2011/07/21/2112894.html,如需转载请自行联系原作者

相关文章
|
10月前
|
Unix
Unix时间戳1970Java与Unix时间戳互转
Unix时间戳1970Java与Unix时间戳互转
64 0
|
7月前
|
开发框架 前端开发 .NET
C# Newtonsoft.Json.Formatting DateTime 日期格式化
C# Newtonsoft.Json.Formatting DateTime 日期格式化
106 0
|
8月前
|
Unix
鸿蒙将unix时间戳转换为string类型
鸿蒙将unix时间戳转换为string类型
124 0
|
10月前
|
C#
C#DateTime时间转换方法大全
C#DateTime时间转换方法大全
463 0
|
10月前
|
C#
53.c#:datetime类
53.c#:datetime类
170 1
C# 对于“日期时间(DateTime)“的处理 时间差计算
C# 对于“日期时间(DateTime)“的处理 时间差计算
|
Ubuntu Unix Python
[oeasy]python0024_unix时间戳_epoch_localtime_asctime_PosixTime_unix纪年法
[oeasy]python0024_unix时间戳_epoch_localtime_asctime_PosixTime_unix纪年法
118 2
|
Unix
遇到的各种时间类型:UTC时间、GMT时间、本地时间、Unix时间戳
每次遇到各种时间傻傻分不清,特意记录一下,给自己提个醒。
453 0
|
Unix API C语言
UNIX时间戳和北京时间的相互转换
UNIX时间戳和北京时间的相互转换
752 0
UNIX时间戳和北京时间的相互转换
C# 中 double 型数值与 DateTime 的相互转换
C# 中 double 型数值与 DateTime 的相互转换