加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

在C#中将LDAP AccountExpires转换为DateTime

发布时间:2020-12-15 18:01:21 所属栏目:百科 来源:网络整理
导读:我想将18位数字字符串从LDAP AccountExpires转换为正常日期时间格式. 129508380000000000 2011年5月26日 我使用以下链接获得了上述转换. http://www.chrisnowell.com/information_security_tools/date_converter/Windows_active_directory_date_converter.as
我想将18位数字字符串从LDAP AccountExpires转换为正常日期时间格式.

129508380000000000>> 2011年5月26日

我使用以下链接获得了上述转换.

http://www.chrisnowell.com/information_security_tools/date_converter/Windows_active_directory_date_converter.asp?pwdLastSet,%20and%20badPasswordTime

我试图通过使用DateTime.Parse或Convert.ToDateTime进行转换.但没有成功.

任何人都知道如何转换它?非常感谢.

解决方法

这是自1月02日至1月6日以来的滴答数.
DateTime dt = new DateTime(1601,01,02).AddTicks(129508380000000000);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读