GetDateTimeFormats()在不同的PC中返回不同的大小 [英] GetDateTimeFormats() return different size in different PC

查看:92
本文介绍了GetDateTimeFormats()在不同的PC中返回不同的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

目前,我正在使用此代码"System.DateTime.Now.Date.GetDateTimeFormats()"来区分两个日期时间值,但是我遇到了一些问题,它在不同的PC中返回不同的大小,因此我该如何解决这个问题
问题.请重播我

例子:

string [] str = dtp_month.Value.GetDateTimeFormats();

因此它会在不同的PC上以不同的格式返回datetime格式
谢谢

Hello friends,

Currently i m using this code "System.DateTime.Now.Date.GetDateTimeFormats()" for differentiate in two datetime values but i am faceing some problem, it is returning different size in different pc so how i can solved this
problem. please replay me

Example :

string[] str = dtp_month.Value.GetDateTimeFormats();

so it return datetime format in different format in different PC
thank you

推荐答案

情况会如此.不同的机器可以通过区域设置来设置不同的区域性,因此返回的尺寸也不同.

请参见此处 [
This will be the case. Different machines can have different cultures set via regional settings and hence different sizes being returned.

See here[^].


这篇关于GetDateTimeFormats()在不同的PC中返回不同的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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