Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Caleb Smith   on Apr 16 In Java Category.

  
Question Answered By: Rochelle Elliott   on Apr 16

If its fixed length, you could use something as simple as:

String oldDate = "11022004";
String newString = oldDate.substring(0, 2) + "/" +
oldDate.substring(2, 4) + "/" + oldDate.substring(4);

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on String to String (Date conversion) Or get search suggestion and latest updates.


Tagged: