dcsimg
Unique no.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kalyani_sairam
Posted On:   Thursday, October 4, 2001 12:45 PM

If I have to generate a unique no. which is forming part of a filename thereby imposing a limitation that it should not be too long. Please suggest me a best method to go about doing the same.

Re: Unique no.

Posted By:   Luke_Latimer  
Posted On:   Friday, October 5, 2001 02:01 AM

Not sure if this is the best way to do this, but the method I've always used is something like:



String reportName = "Report_" + fmtDate.formatDate(new java.util.Date(), "dd.MM.yyyy_HH.mm") + reportExtension;


Of course by including milliseconds too it'll be more unique (you know what I mean).

About | Sitemap | Contact