什么是DateTime.TryParseExact或Convert.ToDateTime(),具有日期格式DD / MM / YY的范围 [英] what is the range of DateTime.TryParseExact or Convert.ToDateTime() having date format dd/MM/yy

查看:155
本文介绍了什么是DateTime.TryParseExact或Convert.ToDateTime(),具有日期格式DD / MM / YY的范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道DateTime.TryParseExact方法或Convert.ToDateTime()有DD / MM / YY输入格式的范围。
类似

I want to know the range of DateTime.TryParseExact method or Convert.ToDateTime() having dd/MM/yy as input format. like

DateTime.TryParseExact("01/07/05","dd/MM/yy",  new CultureInfo("en-US"),DateTimeStyles.None, out dateValue)


DateTime Time=Convert.ToDateTime("01/07/05");

如果我会给35年1月7日,它将不知道我是否在谈论1835年, 1935,2035。所以挑衅它有一定的范围。任何机构了解它的响了起来具有一定的参考?

If i will give 01/07/35, it will not know whether I am talking about 1835,1935,2035. So defiantly it has some range. Any body know about its rang with some reference ?

感谢

推荐答案

如果你问一个两位数的年份如何解释,这取决于文化的的 TwoDigitYearMax 财产

If you're asking how a two digit year is interpreted, it depends on the culture's TwoDigitYearMax property

依赖于计算机的设置。要查看该设置,请访问:

Which depends on the computer's settings. To see what the setting is go to:


  1. 控制面板 - >区域和语言选项

  2. 定制(XP)或其它设置(Win7的)

  3. 日期选项卡。有两个数字的年份如何解释有设置。在我的电脑它解释为1930年和2029之间。

这篇关于什么是DateTime.TryParseExact或Convert.ToDateTime(),具有日期格式DD / MM / YY的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆