/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
try { queryString += ' where Start_Date_Time__c > '; startDate = String.escapeSingleQuotes(startDate); //Protection against SOQL Injection String[] s = startDate.split('/'); for (Integer i=0;i < s.size();i++) if (s[i].length()==1) s[i] = '0' + s[i]; queryString += s[2] + '-' + s[0] + '-' + s[1] + 'T00:00:00Z'; whereUsed=true; } catch (Exception e){ ApexPages.Message m = new ApexPages.Message(ApexPages.Severity.WARNING, 'Start Date is in the wrong format'); ApexPages.addMessage(m); } // salesforce blog: http://www.d3developer.com