为整个项目全局设置DateFormat [英] Setting DateFormat globally for whole project

查看:95
本文介绍了为整个项目全局设置DateFormat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)我在Windows C#中有一个项目,
是否有任何方法可以在整个项目中的所有表单上自定义DateTimePicker控件的日期格式
在运行时,根据客户端要求,例如,如果客户端需要MM/dd/yyyy或dd/MM/yyyy

2)我们可以将MM/dd/yyyy中SQL中现有数据的日期格式更改为dd/MM/yyyy ...

1) I have a project in windows C#,
is there any method to customize the date format of DateTimePicker control on all formas in whole project
at run time,as per the client requirement ,eg if client wants MM/dd/yyyy or dd/MM/yyyy

2)can we change date format of existing data in SQL which is in MM/dd/yyyy to dd/MM/yyyy...

推荐答案

在Windows级别通过Control Panel->Date Time->Change Calendar Settings.

因此,您无需在应用程序中执行任何操作.
This can be done at the windows level via Control Panel->Date Time->Change Calendar Settings.

So you don''t have to do anything in your application.


这篇关于为整个项目全局设置DateFormat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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