DateTime Bug

  • Thread starter Thread starter Darkwing
  • Start date Start date
D

Darkwing

I am using MS Managed code DateTimePicker and it works
fine, well except for all the Culture incompatability
issues. Anyways.. The following seems more like a
Framework issue.

DateTime newDate = DateTime.ParseExact(
"<a russian MMMM formated
month>/12/2003", "MMMM/dd/yyyy", null);

This gives a format exception even though if you do the
following
DateTime newDate = DateTime.ParseExact(
"<a russian MMMM formated month>", "MMMM", null);

It works fine displaying the correct month.

Problem is that the date separator for Russian is "."
not "/" and this is where this DateTime class is having
problems. Given I specified the format, the separator
should not matter.

Just wanted to put this out there.

James.
 
Microsoft NetCF v1 (the only version released so far) does not have a DateTimePicker control. Perhaps you are using a third party control?

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Darkwing" <[email protected]>
| Sender: "Darkwing" <[email protected]>
| Subject: DateTime Bug
| Date: Fri, 17 Oct 2003 00:40:26 -0700
| Lines: 24
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOUge30+3ScpZKASHGMDn5Q7D+C3Q==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:36221
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am using MS Managed code DateTimePicker and it works
| fine, well except for all the Culture incompatability
| issues. Anyways.. The following seems more like a
| Framework issue.
|
| DateTime newDate = DateTime.ParseExact(
| "<a russian MMMM formated
| month>/12/2003", "MMMM/dd/yyyy", null);
|
| This gives a format exception even though if you do the
| following
| DateTime newDate = DateTime.ParseExact(
| "<a russian MMMM formated month>", "MMMM", null);
|
| It works fine displaying the correct month.
|
| Problem is that the date separator for Russian is "."
| not "/" and this is where this DateTime class is having
| problems. Given I specified the format, the separator
| should not matter.
|
| Just wanted to put this out there.
|
| James.
|
 
Back
Top