cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with using Date.valueOf("2005-07-14")

Former Member
0 Kudos

Hello All,

I followed an exmaple available in help.sap.com but it is giving me the "java.sql.date.valueOf cannot be resolved or is not a type". May I ask if someone else has come across this problem before ? Thank you.

<u><b>My Code</b></u>

String dateString = "2005-07-14";

java.sql.Date date = new java.sql.Date.valueOf(dateString);

from

Kwok Wei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

You are not supposed to put new java.sql.Date .

The correct one is

String dateString = "2005-07-14";

java.sql.Date date = java.sql.Date.valueOf(dateString);

Regards

Bharathwaj

Former Member
0 Kudos

Thank you very much Bharathwaj !!!

Looks like I should not blindly follow examples after all

Answers (0)