Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Format$ equiv in Java

Status
Not open for further replies.

jshanoo

Programmer
Apr 2, 2002
287
IN
Hi all,
I want format this java stmt
String tm=d.getHours()+":"+d.getMinutes();

HH:mm format , i am a novice in java,
can anyone give me a helping hand.

Regards
John PHilip


*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Hi,
Thank you New2this.
Myself a novice in these things so very hard to read error messages.
It is giving soem error like this:

sendmail.java [41:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("h"); // 8
^
sendmail.java [42:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("hh"); // 08
^
sendmail.java [45:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("H"); // 8
^
sendmail.java [46:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("HH"); // 08
^
sendmail.java [49:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("m"); // 7
^
sendmail.java [50:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("mm"); // 07
^
sendmail.java [53:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("s"); // 3
^
sendmail.java [54:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("ss"); // 03
^
sendmail.java [57:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("a"); // AM
^
sendmail.java [60:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("z"); // PST
^
sendmail.java [61:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("zzzz"); // Pacific Standard Time
^
sendmail.java [62:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("Z"); // -0800
^
sendmail.java [65:1] reference to Date is ambiguous, both class java.util.Date in java.util and class java.sql.Date in java.sql match
Date date = new Date();
^
sendmail.java [65:1] reference to Date is ambiguous, both class java.util.Date in java.util and class java.sql.Date in java.sql match
Date date = new Date();
^
sendmail.java [68:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("hh:mm:ss a");
^
sendmail.java [72:1] cannot resolve symbol
symbol : class SimpleDateFormat
location: class sendmail
formatter = new SimpleDateFormat("HH.mm");
^
Note: D:\javsms\sendmail.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
16 errors
Errors compiling sendmail.



*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top