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

W

wgan

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

wgan

P.Hill said:
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?
 
T

Tony Morris

wgan said:
"P.Hill" <[email protected]> wrote in message

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
 
P

P.Hill

wgan said:
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
 
T

Tor Iver Wilhelmsen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top