Hello,
I am writing a program in java to get a command line argument in form of date (2000-01-02) and convert it to this format " January 2, 2000".i am new to java and do not know how to proceed.
thanks in advance
Printable View
Hello,
I am writing a program in java to get a command line argument in form of date (2000-01-02) and convert it to this format " January 2, 2000".i am new to java and do not know how to proceed.
thanks in advance
Look up the API for the SimpleDateFormat class. Used correctly, this will allow you to parse a String into a Date object and then format that Date object into a String. You will need two of these objects, one to parse the original String, and the second to format the resulting Date into the second String.
Edit, you can find it here: SimpleDateFormat API
It will take a little bit of time to read and understand, but it's well worth it.
Much luck!