Changing the Locale of parseDateTime

47 views
Skip to first unread message

Oliver Schrenk

unread,
Dec 21, 2012, 3:41:43 PM12/21/12
to h2-da...@googlegroups.com
Hi,

Is there a way to influence the Locale parsedatetime [1] is using to parse dates/times?

I have a date 

16-MAR-06 03.49.39.390000000 PM

that can't be converted using the pattern

dd-MMM-yy hh.mm.ss.S a

although it follows the pattern defined in [2]. I think it's because 
parsedatetime defaults to the machines Locale, because when I parse the 
date with

new SimpleDateFormat("dd-MMM-yy hh.mm.ss.S a", Locale.ENGLISH)
.parse("16-MAR-06 03.49.39.390000000 PM");

it works fine.


Best regards
Oliver Schrenk

OSX 10.8.2
h2 1.3.170

Noel Grandin

unread,
Dec 22, 2012, 6:29:49 AM12/22/12
to h2-da...@googlegroups.com



--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/5XC5sBul6EIJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Reply all
Reply to author
Forward
0 new messages