title: Convert query with STR_TO_DATE to BigQuery syntax
body: <p>I have query that uses the following:</p>
  
  <pre><code>STR_TO_DATE(JSON_EXTRACT_SCALAR(fb.p_dataforanalytics,'$.birthday'), '%m/%d/%Y'), 
  STR_TO_DATE(JSON_EXTRACT_SCALAR(g.p_dataforanalytics,'$.birthday'), '%Y-%m-%d'),    
  date_format(p_birthday, '%Y-%m-%d')
  </code></pre>
  
  <p>This syntax works in MySQL but it doesn't work in BigQuery.
  I somehow needs to convert it using <code>PARSE_DATE</code>(?) but I can't find the proper syntax for this. </p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>PARSE_DATE('%m/%d/%Y', JSON_EXTRACT_SCALAR(fb.p_dataforanalytics,'$.birthday') ),
  PARSE_DATE('%Y-%m-%d', JSON_EXTRACT_SCALAR(g.p_dataforanalytics,'$.birthday')),
  PARSE_DATE('%Y-%m-%d', p_birthday) 
  </code></pre>
  
  <p>Dosent work.
  I get:</p>
  
  <blockquote>
    <p>Invalid result from parsing function</p>
  </blockquote>
  
  <p>and also
  on the <code>p_birthday</code> row:</p>
  
  <blockquote>
    <p>No matching signature for function PARSE_DATE for argument types:
    STRING, INT64. Supported signature: PARSE_DATE(STRING, STRING) at
    [15:33]</p>
  </blockquote>