logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Regarding the Date Format
Date Mon, 27 Feb 2006 20:20:42 GMT

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


Mime
View raw message