title: MySQL convert DateTime (storing a UTC_TIMESTAMP) to number of seconds 1970
body: <p>There are many similar questions out there but I believe this one is unique. (Sorry if it isn't)</p>
  
  <p>Our database has datetime field named "date_sampled", of which we store with UTC_TIMESTAMP()</p>
  
  <p>Our goal is to return the number of seconds since 1970. I noticed UNIX_TIMESTAMP() if supplied no argument returns the current UNIX_TIMESTAMP() and if a datetime (i.e. 2011-10-10) is passed, it returns a timestamp in seconds. </p>
  
  <p>However UTC_TIMESTAMP() does not work like this, it <b>Only</b> returns a current UTC Timestamp. </p>
  
  <p>So how can I convert my DateTime field (holding a UTC datetime) into the seconds from 1970 in MySQL? If it can't be done in MySQL, then a PHP solution will work. </p>
  
  <p>Thanks.</p>