# Aggregation functions on Datetime(6) and Timestamps Change the return type

**URL:** <https://forums.percona.com/t/aggregation-functions-on-datetime-6-and-timestamps-change-the-return-type/6887>\
**Category:** Percona Server for MySQL 8.0\
**Created:** [March 5, 2019, 9:00am UTC](https://forums.percona.com/t/aggregation-functions-on-datetime-6-and-timestamps-change-the-return-type/6887 "2019-03-05T09:00:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkuhn](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mkuhn](https://forums.percona.com/u/mkuhn)\
**Post date:** [March 5, 2019, 9:00am UTC](https://forums.percona.com/t/aggregation-functions-on-datetime-6-and-timestamps-change-the-return-type/6887/1 "2019-03-05T09:00:38Z")

</div>

Hi,

I am not sure if this is a bug or invalid mysql. In both cases it returns using python-mysqlclient a string instead of the correct Datetime object.  
The Mysql workbench on Archlinux returns the result as a string as expected. On my collegues machine Mysql workbench returns Blob, when you click on it, it shows the string. I have tested this query against mysql 5.6,5.7, percona 8, mariadb. So far mariadb was the only server that returned the correct data type.

`SELECT MIN(CAST('2018-01-01 00:00:00' AS datetime)),MIN(TIMESTAMP('2018-01-01 00:00:00'));`

So my question is, is this a bug?
