title: Converting to SalesForce datetime format in Mule-3.8.4 using DataWeave 1.0
body: <p>I am trying to convert a <code>datetime</code> column in a CSV to a salesforce datetime format to do an upsert. I tried expression like below in mule-3.8.4 dataweave1.0 but I am getting an error.</p>
  
  <p>I tried the following:</p>
  
  <p><strong>First Try</strong></p>
  
  <pre><code>Test_Date: "1/14/19 6:31 PM" as :localdatetime { format: "M/dd/yy h:mm a" } as :localdatetime { format: "YYYY-MM-DD'T'hh:mm:ssZ" })
  </code></pre>
  
  <p><strong>Expected Output</strong> : 2019-01-14T06:31:00Z</p>
  
  <p><strong>Actual Output</strong> : Mon Jan 14 18:31:00 EST 2019</p>
  
  <p>After Upsert in Salesforce, it looks like this: <code>2019-01-14T00:00:00.000+0000</code>. It is not saving the time.</p>
  
  <hr>
  
  <p><strong>Second Try</strong></p>
  
  <pre><code>Test_Date: "1/14/19 6:31 PM" as :localdatetime { format: "M/dd/yy h:mm a" } as :localdatetime { format: "YYYY-MM-DD'T'hh:mm:ss" })
  </code></pre>
  
  <p><strong>Expected Output</strong> : 2019-01-14T06:31:00</p>
  
  <p><strong>Actual Output</strong> : Mon Jan 14 18:31:00 EST 2019</p>
  
  <p>After Upsert in Salesforce, it looks like this: <code>2019-01-14T00:00:00.000+0000</code>. It is still not saving the time.</p>
  
  <p>What is the problem?</p>