> > Why is there a converter for java.sql.Date and not one for java.util.Date in > > ConvertUtils ? > > > > Just wondering as it seems to me that util.Date is just as used as sql.Date, > > perhaps even more :) > > > > But to get it to work one should just make ones own util.Date converter, or > > is there something > > I haven't thought about since it is not installed per default ? > > > > It's not clear to me what the default character format of a java.util.Date > should be, since this is typically something that is Locale-sensitive. > Have you got a suggestion in this regard?
I see the following options: 1) Just has an converter for java.util.Date that mimics the current java.sql.Date conversion I think the format is "yyyy-mm-dd" 2) Use Date's parse method that handles a couple of cases see the javadoc 3) Provide a chain of SimpleDateFormat that is tried in some order. e.g. "ddMMyyyy", "dd-MM-yyyy", "yyyy-MM-dd", "yyyy-MM-dd" and then the same just with minutes,seconds, etc. So, I expect that is just an coincidence that there is one for java.sql.Date and not one for java.util.Date ? /max -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
