Localizing dates

From: Chris (anon)
Date: 01/29/05


Date: Fri, 28 Jan 2005 17:53:25 -0600

In the US, the most common date format is mm/dd/yyyy. In Europe, it's
dd/mm/yyyy.

Is there any way to know which format to use, based on the Locale? It
doesn't appear that java.text.DateFormat or java.text.DateFormatSymbols know
about or acknowledge the difference.

I need to know because I have to parse dates in different locations, and I
want to give the parser a hint about what format to expect. Specifying a
format explicitly at run time is not a possibility.



Relevant Pages

  • Re: More VB/Access/SQL syntax problems
    ... formatting it as a U.S. style mm/dd/yyyy date. ... which is a date and the format 101 is U.S. format mm/dd/yyyy. ... you'll notice the original SQL 2005 syntax shows ... Tony K. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: IIF statement using dates
    ... Check your date format i.e. dd/mm/yyyy or ... mm/dd/yyyy etc this can sometimes have a funny effect on dates. ...
    (microsoft.public.access.gettingstarted)
  • Re: Date & Time Format
    ... cell screen allows me to select dd/mm/yyyy as a format but in the example ... screen it shows mm/dd/yyyy. ... dd/mm/yyyy hh:mm which Excel recognises as a date and my formulas work OK. ...
    (microsoft.public.excel.misc)
  • RE: Simple Date Display Question
    ... have a spreadsheet with thousands of dates, all entered in mm/dd/yyyy format. ... matter what I do in this spreadsheet, they display as five digit numbers. ...
    (microsoft.public.excel.misc)
  • Re: validating a date
    ... >mm/dd/yyyy without any letters and only use the slashes. ... The text box would display the date/time ... by specifying the format property or function. ...
    (microsoft.public.access.modulesdaovba)