You need to sign in to do that
Don't have an account?
Bob Nagy
Obvious SF bug or am I missing something - see for yourself
A simple format call on a datetime is return the wrong value. A year that should be 2015 is coming back 2016. Am I missing something?
Here is a simple 3 line code example that demonstrates the problem:
Here is a simple 3 line code example that demonstrates the problem:
// Create a DateTime of December 27, 2015 datetime dtTemp = DateTime.newInstance(2015, 12, 27, 0,0,0); // Format that Date Time - Should Be; December 27, 2015 String sFormatedDate = dtTemp.format('MMMM d, YYYY'); system.debug('++++++++++++++++++Formatted Date = ' + sFormatedDate); // Actual is coming back December 27,2016
Please mark it as best answer if it helps you to resolve.
All Answers
Please mark it as best answer if it helps you to resolve.