how can I convert date infomation to a string just includes the date not the time

Discussion in 'Java' started by wgan, Jul 7, 2004.

  1. wgan

    wgan Guest

    I just want the date like Thu 08, july 2004 but not the exact time.
    how can I do that.
    wgan, Jul 7, 2004
    #1
    1. Advertising

  2. wgan

    P.Hill Guest

    Re: how can I convert date infomation to a string just includes thedate not the time

    wgan wrote:

    > I just want the date like Thu 08, july 2004 but not the exact time.
    > how can I do that.


    Check out SimpleDateFormat.

    -Paul
    P.Hill, Jul 7, 2004
    #2
    1. Advertising

  3. wgan

    Roedy Green Guest

    Roedy Green, Jul 7, 2004
    #3
  4. wgan

    wgan Guest

    "P.Hill" <> wrote in message news:<cchha4$nk4$>...
    > wgan wrote:
    >
    > > I just want the date like Thu 08, july 2004 but not the exact time.
    > > how can I do that.

    >
    > Check out SimpleDateFormat.
    >
    > -Paul


    I got an erro message when I ran the class:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    Date_format/class
    it seems the DateFormat/SimpleDateFormat are missing, but actually, it
    should be there, how can I fix it?
    wgan, Jul 8, 2004
    #4
  5. wgan

    Tony Morris Guest

    "wgan" <> wrote in message
    news:...
    > "P.Hill" <> wrote in message

    news:<cchha4$nk4$>...
    > > wgan wrote:
    > >
    > > > I just want the date like Thu 08, july 2004 but not the exact time.
    > > > how can I do that.

    > >
    > > Check out SimpleDateFormat.
    > >
    > > -Paul

    >
    > I got an erro message when I ran the class:
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > Date_format/class
    > it seems the DateFormat/SimpleDateFormat are missing, but actually, it
    > should be there, how can I fix it?


    Read what your VM is telling you.
    Allow me to spell it out:

    No
    Class
    Def (Definition)
    Found
    Error
    : Date_format/class

    The VM can't find the class definition "Date_format.class".
    No VM will ever find that class because it is impossible for one to exist
    due to the fact that "class" is a keyword and cannot be used as a class
    name.
    http://www.xdweb.net/~dibblego/java/faq/answers.html#q8

    --
    Tony Morris
    http://xdweb.net/~dibblego/
    Tony Morris, Jul 8, 2004
    #5
  6. wgan

    P.Hill Guest

    Re: how can I convert date infomation to a string just includes thedate not the time

    wgan wrote:
    > "P.Hill" <> wrote in message news:<cchha4$nk4$>...
    > I got an erro message when I ran the class:
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > Date_format/class
    > it seems the DateFormat/SimpleDateFormat are missing, but actually, it
    > should be there, how can I fix it?


    Fix what? Where you going to leave us to check our crystal ball?
    Try showing some code, but as others have said Date_format is not DateFormat.
    Also you need to try an appropriate import statement.

    -Paul
    P.Hill, Jul 8, 2004
    #6
  7. (wgan) writes:

    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > Date_format/class


    The .class is a file name extension, not part of the classname. When
    you run Java applications you use the class name, not the file name.
    Tor Iver Wilhelmsen, Jul 8, 2004
    #7
  8. wgan

    Roedy Green Guest

    Roedy Green, Jul 8, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zeng Dinghao
    Replies:
    1
    Views:
    441
    Howard
    Mar 11, 2005
  2. =?Utf-8?B?S2VtaW4=?=
    Replies:
    0
    Views:
    357
    =?Utf-8?B?S2VtaW4=?=
    Jun 11, 2006
  3. Kemin
    Replies:
    0
    Views:
    429
    Kemin
    Jun 12, 2006
  4. AViS
    Replies:
    6
    Views:
    577
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    Aug 17, 2006
  5. Replies:
    1
    Views:
    776
    Paul Boddie
    Mar 11, 2007
Loading...

Share This Page