I have a date field in a custom object that stores the following:
That is what SF tells me the field value contains, when I output it using System.debug() in my Apex code.
Datetime d = priceList.Campaign_Effective_Date_Start__c; System.debug ('Campaign_Effective_Date_Start__c - d = ' + d);
I need to get a formatted version of this date as:
I've tried several ways to format the date, but I always end up getting:
I've read some postings that state that I need to adjust the date to take into account my time zone offset. I'm not sure I understand why, since I'm OK with the date as it is stored in the SF database. I don't have a need to adjust it to take into account my current time zone, which is EDT (or 'America/New_York').
Is there a way I get the original date in formatted correctly, without having to manipulate it based on my current time zone?