Skip to main content
3 events
when toggle format what by license comment
Oct 11, 2016 at 11:57 comment added ted Hi @Prince, I've try the recommended by Ratan. That should be match your question. "String timeTxt = '20:48 11/10/2016'; DateTime dt = DateTime.parse(timeTxt); System.debug('Time: '+ dt.format('MM/dd/yyyy HH:mm:ss')); TimeZone tz = UserInfo.getTimeZone(); System.debug('Time zone 2: '+ dt.format('MM/dd/yyyy HH:mm:ss', 'America/New_York'));"
Oct 11, 2016 at 11:05 comment added Prince I think the question in link is different from Mine. In the link, the user dont want to change the date and time regardless of the locale. But I want to convert this according to user locale.
Oct 11, 2016 at 11:01 history answered ted CC BY-SA 3.0