Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: SimpleDateFormat Date: Mon, 5 Sep 2011 13:11:33 -0700 (PDT) Organization: http://groups.google.com Lines: 14 Message-ID: <73474dec-dfdc-4d01-b00a-d6b679853c38@glegroupsg2000goo.googlegroups.com> References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 24.6.43.78 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1315254273 25856 127.0.0.1 (5 Sep 2011 20:24:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 5 Sep 2011 20:24:33 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.6.43.78; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7582 Roedy Green wrote: > bob wrote, quoted or indirectly quoted someone who said : >> Anyone know how to use SimpleDateFormat to get a lowercase am and pm? > > there is no built in code for that. Think instead how to convert your > date/time string AM/PM to am/pm > > There various ways you can do it with String.charAt String.indexOf > String.toLowerCase Or use Arne's suggestion, which has the virtue of being compact and employing the standard API without having to post-process the output of 'format()'. -- Lew