title: Sqlalchemy convert epoch time to date in group by
body: <p>I am using Sqlalchemy as ORM for PSQL db. My timestamps are stores as epoch times in my database eg, 1525868337991. (in milli sec)</p>
  
  <p>I am writing a query to get count of employees on a particular date(grouping by on date). I am not able to find any way by which, I can convert <strong>epoch to date</strong> in my ORM query, like psql has <strong>to_timestamp</strong>. The query is written below :</p>
  
  <pre><code>employees_details = db.session.query(
        func.count(EmployeeInfo.id).label("employee_count"), EmployeeInfo.employee_created_on, EmployeeSourceInfo.employee_source_display_name
      ).join(
        EmployeeSourceInfo, EmployeeInfo.lead_source_id == EmployeeSourceInfo.id
      ).group_by(func.as_utc(EmployeeInfo.employee_created_on), EmployeeSourceInfo.employee_source_display_name).all()
  </code></pre>