Data Studio
2.2K members online now
2.2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Date field in mySql not recognized

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all.

 

I created a mySql view and the Data Studio connection doesn't recognize my date field YYYY-mm-dd like a date but like a text filed. 

 

Captura de Tela 2016-12-06 às 12.20.52.png

I created a view at mySql with DATE_FORMAT(field, '%Y-%m-%d'). I don't know why doesn't work.  :-/

Best regards,
Adalberto Generoso

1 Expert replyverified_user

Date field in mySql not recognized

Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭

Hi @Adalberto G,

 

I have had issues with auto-recognition of dates also. However, manually changing this field type usually solves this, can you click the dropdown next to your field and choose 'date'?

 

Ben

Re: Date field in mySql not recognized

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Tks for answer Ben.

I tried change manually the field type but appeared this msg bellow and, when I try use this field like a date range dimension, doesn't work:

 

Captura de Tela 2016-12-06 às 14.40.19.png

 

What do you think about?

 

tks a lot.

 

best regards,

Adalberto Generoso

 

Date field in mySql not recognized

Explorer ✭ ✭ ✭
# 4
Explorer ✭ ✭ ✭

Hi @Adalberto G,

 

I saw this same message I just clicked 'continue' as my data WAS in the format suggested - if you believe your data is too then I would try that, hopefully it should work just fine! Smiley Happy

 

Ben

Re: Date field in mySql not recognized

[ Edited ]
Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi Ben.

 

Unfurtunately doesn't work.  :-(

I did set the field as date but, nothing again. Check it:

Captura de Tela 2016-12-08 às 11.55.59.png

Captura de Tela 2016-12-08 às 11.58.11.pngCaptura de Tela 2016-12-08 às 11.58.28.png

 

I don't know what I can do to fix it. :-/

 

Best regards,

Adalberto Generoso

Date field in mySql not recognized

Google Employee
# 6
Google Employee

Hi Adalberto

 

Did you ever resolve this issue? Does it work if you change the format to remove the hyphens? I.e., DATE_FORMAT(field, '%Y%m%d')

 

If that doesn't work, you can share the report and data source with data-studio-help@google.com and I'll take a look.

 

Rick

 

 

Date field in mySql not recognized

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Rick,

 

I need help with this...I'm trying to get a Date field from MySQL data source to correctly display as a date....the the date field is appearing/defaulting as a text field. Any suggestions? Thanks

Date field in mySql not recognized

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

For what its worth....I got this working...only when I removed the spaces from the source field name. [Inv Date] did not work but [InvDate] does

Date field in mySql not recognized

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

I'm facing th exact problem. Dates columns from a view aren't recognized. I've tried various formats. But nothing seems to work. Is there a definitive solution for this because all I see on forums are hit and trial methods that don't seem to work for everyone. 

Date field in mySql not recognized

[ Edited ]
Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

I have had the same problem, when using Data Studio with Cloud SQL (MySQL). I found that, as stated by 'Brad E', it seems to be triggered by field names with spaces in them. But not just the date field itself - if any field name in the table has a space, this seems to cause the date field recognition to fail.

 

(The reason I was using field names with spaces was so that they would look good as display names when displayed in Data Studio. But then I noticed that you can edit the field names when creating a data source.)