SimpleDateFormat is not interpreting %g -


final string log_filename =  new simpledateformat("'tool_'yyyymmddhhmmss_sss_'%g.log'").format(new date(system.currenttimemillis())); string logfileptrn = new stringbuilder(system.getproperty("user.dir")).append(system.getproperty("file.separator")).append(log_filename).tostring(); 

when print log file prints log file location:/tool/log/tool_20140625155513_309_%g.log

but actual log file got generated tool_20140625161235_309_0.log

any appreciated.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -