Results 1 to 2 of 2
  1. #1
    enigmaenigma is offline Member
    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Default Need help using date class

    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

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Need help using date class

    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!

Similar Threads

  1. custom made up date class with calendar
    By infernocy in forum Advanced Java
    Replies: 1
    Last Post: 04-12-2012, 07:42 PM
  2. Replies: 5
    Last Post: 02-16-2012, 10:26 AM
  3. Date() class to get current date
    By bigmac15 in forum New To Java
    Replies: 1
    Last Post: 06-28-2011, 10:17 PM
  4. Help creating a Date class
    By Meta in forum New To Java
    Replies: 17
    Last Post: 04-30-2010, 10:28 AM
  5. problem with date class
    By gabriel in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •