473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Format error

Hi,
I am attempting to troubleshoot the following error, so far with no success.

[InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.]
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value, CultureInfo culture) +163
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value) +53
cp_ContactManagement_v2_0.CallReport.Page_Load(Obj ect sender, EventArgs e) in c:\inetpub\wwwroot\cp_ContactManagement_v2_0\CallR eport.aspx.vb:243
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

It is being generated from within a web application - here is the line that fails:

dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")

The error is generated only when the dll is run from my local host - many other machines including the server that hosts the site run it successfully. I have checked the date settings in my regional settings to no avail. If I change the formatting to "dd/MM/yyyy" it executes successfully, but then other failures occur. I have reinstalled my development environment environment but still have the problem.
I have not yet reinstalled IIS which is what I guess I will try next.

Thanks for any ideas you may have,
--
Sheldon
Jul 21 '05 #1
3 2135
Hi Sheldon,

Try setting the culture and the uiCulture in the globalization section of your web.config.

For example :

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="nl-BE"
uiCulture="nl-BE"
/>

I experienced trouble with date formats, when I started using a new computer. It seemd that my frontend application was running in a different culture then my backend application. (Probably because my computer was installed with other regional settings, then I currently use.)

Setting this globalization solved my problem.

Kind regards,
Michel

"Sheldon" wrote:
Hi,
I am attempting to troubleshoot the following error, so far with no success.

[InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.]
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value, CultureInfo culture) +163
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value) +53
cp_ContactManagement_v2_0.CallReport.Page_Load(Obj ect sender, EventArgs e) in c:\inetpub\wwwroot\cp_ContactManagement_v2_0\CallR eport.aspx.vb:243
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

It is being generated from within a web application - here is the line that fails:

dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")

The error is generated only when the dll is run from my local host - many other machines including the server that hosts the site run it successfully. I have checked the date settings in my regional settings to no avail. If I change the formatting to "dd/MM/yyyy" it executes successfully, but then other failures occur. I have reinstalled my development environment environment but still have the problem.
I have not yet reinstalled IIS which is what I guess I will try next.

Thanks for any ideas you may have,
--
Sheldon

Jul 21 '05 #2
Hi Sheldon,

Try setting the culture and the uiCulture in the globalization section of your web.config.

For example :

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="nl-BE"
uiCulture="nl-BE"
/>

I experienced trouble with date formats, when I started using a new computer. It seemd that my frontend application was running in a different culture then my backend application. (Probably because my computer was installed with other regional settings, then I currently use.)

Setting this globalization solved my problem.

Kind regards,
Michel

"Sheldon" wrote:
Hi,
I am attempting to troubleshoot the following error, so far with no success.

[InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.]
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value, CultureInfo culture) +163
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value) +53
cp_ContactManagement_v2_0.CallReport.Page_Load(Obj ect sender, EventArgs e) in c:\inetpub\wwwroot\cp_ContactManagement_v2_0\CallR eport.aspx.vb:243
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

It is being generated from within a web application - here is the line that fails:

dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")

The error is generated only when the dll is run from my local host - many other machines including the server that hosts the site run it successfully. I have checked the date settings in my regional settings to no avail. If I change the formatting to "dd/MM/yyyy" it executes successfully, but then other failures occur. I have reinstalled my development environment environment but still have the problem.
I have not yet reinstalled IIS which is what I guess I will try next.

Thanks for any ideas you may have,
--
Sheldon

Jul 21 '05 #3
Hi Sheldon,

Try setting the culture and the uiCulture in the globalization section of your web.config.

For example :

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="nl-BE"
uiCulture="nl-BE"
/>

I experienced trouble with date formats, when I started using a new computer. It seemd that my frontend application was running in a different culture then my backend application. (Probably because my computer was installed with other regional settings, then I currently use.)

Setting this globalization solved my problem.

Kind regards,
Michel

"Sheldon" wrote:
Hi,
I am attempting to troubleshoot the following error, so far with no success.

[InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.]
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value, CultureInfo culture) +163
Microsoft.VisualBasic.CompilerServices.DateType.Fr omString(String Value) +53
cp_ContactManagement_v2_0.CallReport.Page_Load(Obj ect sender, EventArgs e) in c:\inetpub\wwwroot\cp_ContactManagement_v2_0\CallR eport.aspx.vb:243
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

It is being generated from within a web application - here is the line that fails:

dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")

The error is generated only when the dll is run from my local host - many other machines including the server that hosts the site run it successfully. I have checked the date settings in my regional settings to no avail. If I change the formatting to "dd/MM/yyyy" it executes successfully, but then other failures occur. I have reinstalled my development environment environment but still have the problem.
I have not yet reinstalled IIS which is what I guess I will try next.

Thanks for any ideas you may have,
--
Sheldon

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: JN | last post by:
Hello, I use an ASP mail object to send orders filled online to a recipient via an e-mail. I would like to know if it's possible to format the way the order looks in an e-mail? I tried the...
2
by: Bernd Lambertz | last post by:
I have a problem with bcp and format files. We changed our databases from varchar to nvarchar to support unicode. No problems so fare with that. It is working fine. But now I need a format...
1
by: Michelle Hillard | last post by:
Hi guys, would appreciate if you can shed some light on this. Sorry to be a pain, can you tell me what is wrong with the following: for /F %%i in ('dir /b /on c:\bcp\pc*.txt') do bcp...
7
by: Niall Porter | last post by:
Hi all, I'm building an ASP app on a Windows 2000/IIS machine which interfaces with our SQL Server 2000 database via OLE DB. Since we're based in the UK I want the users to be able to type in...
10
by: Jack | last post by:
Hi, I cannot get the date format correctly in dynamic sql statement, after trying various ways of handling it. I need some help with the date format in the following dynamic sql statement. Any...
1
by: mahnovetsky | last post by:
Does anybody know of a way to set the format property for a date field in VBA?? I need to set the property to medium so I can display display aussie dates on a graph.. Here is what Im doing: ...
1
by: John Marble | last post by:
I looked around for a way to change the format and the decimal setting of a REAL type variable, but I can't seem to be able to find the synthax anywhere. Here is an exemple of what I am doing: ...
5
by: blackg | last post by:
Input string not in correct format -------------------------------------------------------------------------------- I am trying to view a picture from a table. I am getting this error Input string...
8
by: bienwell | last post by:
Hi, I have a problem of displaying data bound by a datalist control. In my table, I have a field Start_date which has Short Date data type. I tried to update this field by Current Date. After...
0
by: Peter Nofelt | last post by:
Hi all, ISSUE: ==================== In SQL 2005 (sp2) I get the following error when preforming a bulk insert with an associated xml format file: "Could not bulk insert. Unknown version of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.