Re: date rendered differently on two computers with same regional settings
- From: Alexey Smirnov <alexey.smirnov@xxxxxxxxx>
- Date: Thu, 09 Aug 2007 01:57:25 -0700
On Aug 9, 10:05 am, "Mark" <m...@xxxxxx> wrote:
This is the complete message i get:
Server Error in '/myappl' Application.
--------------------------------------------------------------------------------
Conversion from string "13-08-07" to type 'Date' is not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Conversion from string
"13-08-07" to type 'Date' is not valid.
Source Error:
Line 17: datbeg = e.NewValues("datbeg")
Line 18: datend = e.NewValues("datend")
Line 19: lec2 = e.NewValues("lector2")
Line 20: e.NewValues("datbeg") = String.Format("{0:yyyy.MM.dd}",
datbeg)
Source File: C:\Inetpub\wwwroot\myapp\test.aspx.vb Line: 18
Stack Trace:
[InvalidCastException: Conversion from string "13-08-07" to type 'Date' is
not valid.]
Just a quick though on this,
try to use ParseExact
yourdateobj = DateTime.ParseExact("13-08-07", "dd-MM-yy",
System.Globalization.CultureInfo.InvariantCulture)
or use an appropriate culture
.
- References:
- date rendered differently on two computers with same regional settings
- From: Mark
- Re: date rendered differently on two computers with same regional settings
- From: Göran Andersson
- Re: date rendered differently on two computers with same regional settings
- From: Mark
- Re: date rendered differently on two computers with same regional settings
- From: Göran Andersson
- Re: date rendered differently on two computers with same regional settings
- From: Mark
- date rendered differently on two computers with same regional settings
- Prev by Date: Re: Web Form and ADO.NeT Transaction
- Next by Date: Re: date rendered differently on two computers with same regional settings
- Previous by thread: Re: date rendered differently on two computers with same regional settings
- Next by thread: Re: date rendered differently on two computers with same regional settings
- Index(es):
Relevant Pages
|