superset icon indicating copy to clipboard operation
superset copied to clipboard

date type field display error

Open qinzl1 opened this issue 9 years ago • 15 comments

date type column in table display timestamp in superset ,in database the value is '2017-08-08' but in superset display look like '1500324543543',how convert is correct

qinzl1 avatar Aug 10 '17 09:08 qinzl1

We have the same issue with MySQL and column type DATE.

ghost avatar Aug 10 '17 22:08 ghost

@mistercrunch which build can't you reproduce this bug on? Here is our setup:

Table designer setup for our date field: screen shot 2017-08-13 at 9 41 50 am

What the date looks like: screen shot 2017-08-13 at 9 42 09 am

How our TableView slice is configured: screen shot 2017-08-13 at 9 41 13 am

What our TableView slice looks like: screen shot 2017-08-13 at 9 40 40 am

Looks like it's a known bug for 0.18.5: https://stackoverflow.com/questions/45248010/date-formatting-in-superset-with-mysql/45570314#45570314

ghost avatar Aug 13 '17 16:08 ghost

Seeing the same behavior in 0.19.0

amancevice avatar Aug 23 '17 10:08 amancevice

Same problem in the latest master :(

JessicaDuan avatar Sep 08 '17 03:09 JessicaDuan

Hi, I've compared the differences between 0.19.1 and 0.15.2, and found that: class TableViz => def json_dumps()

In 0.15.2, it was: return json.dumps(obj, default=utils.json_iso_dttm_ser)

Current Result: 1504860088000 | 1504860138000 | 1504860159000 | 0 | 1504828800000 | 2017-09-08 08:00:00 | 1003

After: def json_dump(): return json.dumps(obj, default=utils.json_iso_dttm_ser)

2017-09-07T17:59:33 | 2017-09-07T18:19:47 | 2017-09-07T18:20:08 | 0 | 2017-09-07 | 2017-09-07T08:00:00+08:00 | 1003

JessicaDuan avatar Sep 08 '17 03:09 JessicaDuan

Any progress in fixing this bug?

vnnw avatar Sep 21 '17 05:09 vnnw

The workaround for me was to create a column that casts the date/timestamp to a string. Not great, but works.

amancevice avatar Sep 21 '17 09:09 amancevice

I've got the same issue exactly on mysql and superset 0.19.1

macfly1202 avatar Sep 21 '17 10:09 macfly1202

dateissue Getting the same error for 0.20.6 Database - Clickhouse, column type: Date Date comes properly when in Pivot Table view. Is messed up with Table View and in Time Dashboard Filter, when using the date column in Filter Column.

Nina07 avatar Dec 20 '17 10:12 Nina07

I am seeing this error as well. It looks like on output, if the field looks "datish" it converts it. I created a DB level view that added a d: in front of my YYYY-MM-DD and it stop showing this as a date then (nothing else changed). The infered type shows VARCHAR, etc.

JohnOmernik avatar Apr 02 '18 15:04 JohnOmernik

Actually this is the exact problem i am facing.How am i suppose to get out of it?

felexkemboi avatar Aug 26 '19 13:08 felexkemboi

dateissue Getting the same error for 0.20.6 Database - Clickhouse, column type: Date Date comes properly when in Pivot Table view. Is messed up with Table View and in Time Dashboard Filter, when using the date column in Filter Column.

Any solution to this?

felexkemboi avatar Aug 26 '19 13:08 felexkemboi

Anybodystill facing this challenge,i solved it by DATE_FORMAT(pay.created_at, '%Y-%m-%d %H:%m:%s' ) 'DateCreated',` in my date column.Basically you change the format of your column during querying the database, that is if you are using mysql like for my case

felexkemboi avatar Aug 27 '19 13:08 felexkemboi

i have same issue for pie chart. any solution to this??

Riskatrih avatar Feb 23 '21 06:02 Riskatrih

Honestly I'm not that good in coding I'm just a beginner

On Mon, Feb 22, 2021, 11:25 PM Riska Tri Handayani [email protected] wrote:

i have same issue for pie chart. any solution to this??

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/superset/issues/3271#issuecomment-783942233, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDBY6UA7DR7XJRVVJ62TQTTANC6TANCNFSM4DWMS6NQ .

0101Unkown0101 avatar Feb 23 '21 06:02 0101Unkown0101