New answers tagged

0

I actually started coding along similar lines. String[] monthList = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','); string wannabeDate = '09:30:12 Jan 02, 2022 PST'; string timePart = wannabeDate.substring(0,8); System.Debug(timePart); string datePart = wannabeDate.substring(9,(9+12)); System.Debug(datePart); string timeZone = wannabeDate....


2

There's nothing you can do. Manual parsing is required. This isn't as bad as it sounds though, as you can: public static DateTime parsePaypalIpnDate(String theDate) { String[] months = new String[] { '', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' }; Pattern ipnDatePattern = Pattern.compile('(\\d+):(\\d+):(\\d+) ...


Top 50 recent answers are included