Cannot figure out how to code this...
Write a program that converts date formats from American Format: “September 10, 2012” to International Format; - such as "2012-September-10”.
Im also confused as to if he is asking for the date input and then to reformat it into international, or to just take the american formatted date and convert it to international format.
Any help would be much appreciated!!
Re: Cannot figure out how to code this...
I think the coding really depends on what "he" is asking for. I think you should ask for clarification from that person yourself but you could try programming them both ways for the extra practice. For example, you could write a program that takes a list of (or a) given date(s) and convert it. You could also try to write another that converts inputted dates.
Re: Cannot figure out how to code this...
You can start reading some examples about SimpleDateFormat, In my opinion is the best way to do what you have to do ...
Re: Cannot figure out how to code this...
The first step in solving any problem is having a clear, well defined problem to solve. In this case it seems clear enough:
Write a program
converts date formats( from American Format: “September 10, 2012” )
to International Format; - such as "2012-September-10”.