Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在asp.net mvc 2中有应用程序。创建用户中的一种形式。但是这种形式不接受 dd/MM/yyyy 和 MM/dd/yyyy 的日期格式,我想允许 MM/dd/yyyy 保存在数据库中必须做什么。我正在使用 c# 语言。
您需要更改 web.config 上的全球化标签。
假设您希望日期格式为“dd/MM/yyyy”,它用于巴西-葡萄牙语。为此,请将其添加到 web.config 中:
<globalization enableClientBasedCulture="true" culture="pt-BR" uiCulture="pt-BR"/>
您只需要找到最适合您的应用程序的文化。