区域设置/日期时间问题

区域设置/日期时间问题

问题描述:




我有一个简单的页面,它从数据库中的日期时间列中读取日期。

存储在数据库中的日期在''mmddyyy ''格式('''7/27/2005 07:30:00 AM'')

但asp.net将其显示为''07/07/2005 7:30:00 AM' '。


我已经检查并更正了美国 - 英语的语言环境,但我仍然得到这个

问题。


有什么帮助吗?线索?


Thnx

Hi,

I have a simple page which reads date from a datetime column in database.
Date stored in the database is in ''mmddyyy'' format (''7/27/2005 07:30:00 AM'')
but the asp.net displays it as ''27/07/2005 7:30:00 AM''.

I have checked and corrected locales to US - English, but I still get this
problem.

Any help? clues?

Thnx

尝试将此添加到您的Page指令

culture =" en-US"

HTH

Try adding this to your Page directive
culture="en-US"

HTH


这样可行。


如果需要应用程序范围的设置,请使用:


< globalization

culture =" en-US"

uiCulture =" en-US"

/>


在web.config中。



Juan T. Llibre

ASP.NET MVP
http://asp.net.do/foros/

Foros de ASP.NET en Espa?ol

Ven ,y hablemos de ASP.NET ...

======================


" Hugo Flores" &LT;胡********* @ ge.com&GT;在消息中写道

news:11 ********************** @ o13g2000cwo.googlegr oups.com ...
That would work.

If an application-wide setting is wanted, use :

<globalization
culture="en-US"
uiCulture="en-US"
/>

in web.config.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
Ven, y hablemos de ASP.NET...
======================

"Hugo Flores" <hu*********@ge.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
尝试将此添加到您的Page指令
culture =" en-US"

HTH
Try adding this to your Page directive
culture="en-US"

HTH



感谢Hugo,


这样有效,但除了把

''en-US''作为页面指令之外,还有什么别的办法吗? ?


Thnx


" Hugo Flores"写道:
Thanks Hugo,

That worked, but is there any thing else I could do other than putting
''en-US'' as the page directive?

Thnx

"Hugo Flores" wrote:
尝试将此添加到您的Page指令
culture =" en-US"

HTH
Try adding this to your Page directive
culture="en-US"

HTH