有多少不同的地方,你必须设置日期格式在IIS 7.0和win2k8 [英] How many different places do you have to set date formats in IIS 7.0 and win2k8

查看:149
本文介绍了有多少不同的地方,你必须设置日期格式在IIS 7.0和win2k8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个老的经典ASP应用程序迁移到IIS 7.0 win2k8和我绝对不想改变旧code,如果我能帮助它。

I am trying to migrate an old classic asp application to IIS 7.0 with win2k8 and I definately don't want to change the old code if I can help it.

我在日期格式设置的自定义区域选项日期格式
在控制面板区域和和语言选项,以DD-MMM-YY。

I have set a date format in the Customise Regional Options in the Date formats in the regional and and language options in the control panel to dd-MMM-yy.

我仍然得到Conversion_failed_when_converting_datetime_from_character_string
使用此日期格式,即使重新启动后的错误。

I am still getting Conversion_failed_when_converting_datetime_from_character_string errors using this date format even after reboots.

我使用也使用SQL Server防爆preSS 2005年。

I am using also using SQL Server Express 2005.

还有什么地方你需要设置日期格式?如果他们都从机器的设置有所回升?

Where else do you need to set date formats? Should they all be picked up from the machine setting?

老code做了很愚蠢,但我又不想必须改变它,然后再次测试了这一切。

The old code does something really dumb, but again I don't want to have to change it and then test it all again.

老code有效地做到这一点
INSERT INTO MyTable的(ThisDate)VALUES('&放大器;现在()及')

The old code effectively does this "Insert Into MyTable (ThisDate) Values ('" & Now() & "')"

生成INSERT INTO MyTable的(ThisDate)VALUES('17 / 03/2009三时四十分48秒时三十分。')

Generates Insert Into MyTable (ThisDate) Values ('17/03/2009 3:40:48 p.m.')

消息241,级别16,状态行1
转化率从字符串转换日期时间时失败。

Msg 241, Level 16, State 1, Line 1 Conversion failed when converting datetime from character string.

什么它实际上抱怨是下午字符串dispite的一部分
在机器指定的区域设置为不使用这一点。

What it's ACTUALLY complaining about is the "p.m." part of the string dispite the Region settings on the machine specifying to NOT use this.

推荐答案

有只有你必须将其设置,对于注重区域设置任何应用程序一个地方,你已经设置它。

There is only one place you have to set it, for any application that pays attention to regional settings, and you've already set it there.

什么是 Conversion_failed_when_converting_datetime_from_character_string 的呢? VBScript的?也许它并不注重区域设置。

What is "Conversion_failed_when_converting_datetime_from_character_string" from? VBScript? Maybe it doesn't pay attention to regional settings.

这篇关于有多少不同的地方,你必须设置日期格式在IIS 7.0和win2k8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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