+ Start a Discussion
bca321bca321 

Date type

Hi.

 

My date method  is

 

Date submitDate;

 

string year = '';

string month = '';
string day = '';           
string stringDate = year + '-' + month + '-' + day;
Date SubmitDate = date.valueOf(stringDate);

 

But still error. help me

SuperfellSuperfell

try using date.newinstance instead

 

Date s = date.newinstance(Integer.valueOf(year), Integer.valueOf(month), Integer.valueOf(day)); 

bca321bca321

Hi,

 

But my date format is 

 

09 JAN 06

 

I think I can't use  date.newinstance