Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with a very quirky DateUtils function...

Status
Not open for further replies.

DevIntProd

Programmer
Feb 6, 2004
25
US

Below is the code we are using:

String timeStamp2 = DateUtils.timeStamp("%m%d%y");
String errorFile = baseDirectory + "/Errors/" + collabName + "-error-data." + timeStamp2;

The problem is once in a while, instead of getting errorFile string to be something like:

D:/eGate/client/Errors/collabName-error-data.022004

we get

D:/eGate/client/Errors/collabName-error-data.02202004

It is being returned as a four digit ccyy, instead of just yy. This is odd because it only happens like this once in a great while. Has any experienced this before, and if so, have you found the real problem? Thanks in advance :)

Happy Coding.

-Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top