Skip to main content

Posts

Showing posts with the label date formatting

How to Parse date in SFDC?

Date format used to vary from system to system. In SFDC it is like YYYY-MM-DD -2016-03-10 00:00:00 Lets say date format is DD/MM/YYYY in other system, how will we store such date foramt ? String s = '15/08/2014'; date dt = Date.Parse(s); System.debug('Printing--today date -'+system.today()); System.debug('Printing---'+dt); Out put will be 11:25:10.11 (12471791)|USER_DEBUG|[3]|DEBUG|Printing--today date -2016-03-10 00:00:00 11:25:10.11 (12560905)|USER_DEBUG|[5]|DEBUG|Printing---2014-08-15 00:00:00