function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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