CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    Devon, UK
    Posts
    212

    IsNumeric/IsDate on French XP

    Hi again.

    In an English culture, I would expect IsNumeric("1.212,3") to return False, and it does. Moving onto a French culture, I would expect it to return True (as that is how that culture writes numbers), but it doesn't. Further, IsDate("1.212,3") returns True (parses to 03-Jan-0212) when running under either culture (though both built in an English culture). Is this a bug? Do I need to do something before calling them in order to take note of the culture I'm running under?

    Any comments appreciated,
    T
    Some cause happiness wherever they go; others, whenever they go.

  2. #2

    Re: IsNumeric/IsDate on French XP

    I always thought that by using IsNumeric() every single character is checked and not the whole string as a number. "," and "." are not numbers so that would explain why it returns "false" in french environment.
    It's also possible that only the decimal separator is allowed, so that if you ommited the "." it would return "true"

    No answer for the IsDate()-concerns...
    Last edited by asSiDeluxE!; February 1st, 2005 at 05:17 PM.

  3. #3
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: IsNumeric/IsDate on French XP

    take out the dot and the isnumeric should return true in french.. There's no . as a thousand delimiter in french ( Well not that I'm aware of at least ).
    Nicolas Bohemier

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured