So from what I have found I would have to write a swap method? Only problem is from the codes I have been looking over it is a bit over my head.
I am getting a value from a xml file, for example “20120411” What I would like it to be once passed to another string is April 11, 2012, or at least 04/11/12. I have found simple ways to do this in just about every other language besides java. If its simple enough for someone to show me the code to accomplish this, or point me in the right direction I would appreciate it!
Look at using a SimpleDateFormat object. There are many many examples of how to use this in this forum, and so a little searching will bring you riches. If you look this over and still are stuck, then you should consider showing us your attempt and tell us what’s not working for you, and we’ll likely be able to easily help you.
A format String to try includes “yyyyMMdd”. You’d construct your SDF object with this String, parse the xml String and thereby turn it into a Date object. You’d use a second SDF object with a different pattern String, perhaps “MMMM dd, yyyy” to format the Date into a different String. Again, give it a try!
e.g.,