Claus on Code

A data dudes random musings about code, bugs, products, life etc.

SQL Convert datetime to Salesforce date format

If anyone, as I, suffers the pain of generating SOQL to salesforce, here’s a little tip 🙂 If you have a datetime field, which you have to use in the SOQL, then convert it like so:


Then you get it in the format


As salesforce wants it 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *