I have date field "dt" which debug like '2015-06-25', and I have to change the format like 06/25/2015. Since we can't use
.format('MM/DD/YYYY') on date field. I have converted it to DateTime.
DateTime dtt = datetime.newInstanace (dt.Year(),dt.month().dt.day()) ;
Now when I debug dtt ,it's coming as 2015-06-25 07:00:00 , Don't know how 7 is coming. anyways when I try to change the format..
dtt.format('MM/DD/YYYY') is coming as 06/176/2015 but it should come 06/25/2015
please help . Thanks