You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Avinash Sridhar <av...@gmail.com> on 2006/02/27 19:27:31 UTC
Regarding the Date Format
Hello,
thanks for the reply and useful information.
I did find log4j.properties file and changed it like this , %d{MMM dd, yyyy
hh:mm:ss}, this will give me the date format in the correct way, but it
doesnot give me the AM/PM option.
How can I get the AM/PM option after the time?, right now, it is like a 24
hour clock, shows 13,14 instead of 1pm, 2 pm.
I think you got the question right?
Hopefully you will get back with a suggestion.
Thanks
Re: Regarding the Date Format
Posted by Curt Arnold <ca...@apache.org>.
On Feb 27, 2006, at 12:27 PM, Avinash Sridhar wrote:
> Hello,
>
> thanks for the reply and useful information.
>
> I did find log4j.properties file and changed it like this , %d{MMM
> dd, yyyy
> hh:mm:ss}, this will give me the date format in the correct way,
> but it
> doesnot give me the AM/PM option.
>
> How can I get the AM/PM option after the time?, right now, it is
> like a 24
> hour clock, shows 13,14 instead of 1pm, 2 pm.
>
> I think you got the question right?
>
> Hopefully you will get back with a suggestion.
>
> Thanks
See http://java.sun.com/j2se/1.4.2/docs/api/java/text/
SimpleDateFormat.html.
I'm surprised you get a 24-hour clock. To get that you should have
used an HH not an hh. Add an " a" to your current format and you
should be set.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org