title: BigQuery - Convert Array of dates into string
body: <p>I have a table in <code>Big Query</code>, with some fields that are arrays of dates (type Date Repeated). I need to convert them into a string. For arrays of strings fields I am doing it as below, and it works fine:</p>
  
  <pre><code>ARRAY_TO_STRING(national_id, "|", "") AS national_id
  </code></pre>
  
  <p>But when the field is an array of dates I´m getting below error.</p>
  
  <blockquote>
    <p><em>No matching signature for function ARRAY_TO_STRING for argument types: ARRAY, STRING, STRING. Supported signatures:
    ARRAY_TO_STRING(ARRAY, STRING, [STRING]);
    ARRAY_TO_STRING(ARRAY, BYTES, [BYTES]) at [41:1]</em></p>
  </blockquote>
  
  <p>I also tried casting date to string as below:</p>
  
  <pre><code>ARRAY_TO_STRING(cast(natural_person_date_of_birth_list as string), "|", "") AS natural_person_date_of_birth_list,
  </code></pre>
  
  <p>But I´m getting below error:</p>
  
  <blockquote>
    <p><em>Invalid cast from ARRAY to STRING at [41:22].</em></p>
  </blockquote>
  
  <p>Can anyone help me on this issue?</p>
  
  <p>Thank you very much</p>