转换该字符串DateTime对象

转换该字符串DateTime对象

本文介绍了转换该字符串DateTime对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,人们可以将字符串转换为DateTime()对象,但据我所知道的字符串需要以特定形式已经例如20121029

I know that one can convert a string to a dateTime() object, but as far as I know the string needs to be in a particular form already e.g. "20121029".

我有一个字符串,它看起来就像这样:

I have a string that looks exactly like this:

2012-10-29T08:45:00.000

...推在正确的方向的人。

...Push in the right direction anyone?

推荐答案

输出是从的结构, DateTime.parse(2012-10-29T08:45:00.000)。,应该解决的问题。

The output is typical from DateTime structure, DateTime.parse("2012-10-29T08:45:00.000"), should solve the problem.

要了解更多关于日期和时间Fromat字符串见的

To know more about Date and Time Fromat String see this

这篇关于转换该字符串DateTime对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 23:37