将LotusNotes datetime转换为C# [英] Convert LotusNotes datetime to C#
本文介绍了将LotusNotes datetime转换为C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用interop.domino.dll从domino数据库中提取LotusNotes模式。现在问题出在架构中我以下列格式获取日期时间
20150323T012130,00-08
这不能转换为C#DateTime。如果有人为我提供了一些意见,这将是一个很好的帮助。
Hi,
Im using interop.domino.dll to extract LotusNotes schemas from domino database. Now the problem is inside the schema I'm getting datetime in the following format
20150323T012130,00-08
which is not convertible to C# DateTime. It will be a great help if someone provide me some input on this.
推荐答案
DateTime.ParseExtract可能会帮助你。
DateTime.ParseExtract might help you.
string lotusNotesDateTime = "20150323T012130,00-08";
string format = "yyyyMMdd'T'HHmmss";
DateTime dateTime = DateTime.ParseExact(lotusNotesDateTime.Substring(0, 15), format, CultureInfo.InvariantCulture);
这篇关于将LotusNotes datetime转换为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文