Tuesday, 4 March 2014

Convert String to Date format

string str='7/28/2013';     /*Format must be mm/dd/yyyy
Date dt=Date.parse(str);

orstring str='2013/7/28';     /*Format must be yyyy/mm/dd
Date dt=Date.valueof(str);


No comments:

Post a Comment