question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't use mysql DATE_FORMAT function

See original GitHub issue

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven’t found one similar

Superset version

master

Expected results

image

Actual results

image

Steps to reproduce

select DATE_FORMAT(now(), '%h%i%s');

other

It looks like confusion with python syntax

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dengshaochuncommented, Dec 7, 2017

how to fix if i query like is

select indb_time, TotalFiles, BlocksTotal 
from hdfs_info_logs 
where statis_date>=20171101 
and DATE_FORMAT(indb_time, '%%H%%i%%S') = '000000';

and use Visualize , it will auto add double % in my query image

1reaction
tanjxyzcommented, Dec 7, 2017

double %, i usually do this. but u should only use one in datasource…

Read more comments on GitHub >

github_iconTop Results From Across the Web

MySQL 8.0 Reference Manual :: 12.7 Date and Time Functions
Returns the current date and time as a value in ' YYYY-MM-DD hh:mm:ss ' or YYYYMMDDhhmmss format, depending on whether the function is...
Read more >
date format - MYSQL DATE_FORMAT Function not working
1 Answer 1 ... If the month is not setted in gig_guide.date, the mysql can't make representation 00.month as a string. Try it...
Read more >
MySQL DATE_FORMAT() function - w3resource
MySQL DATE_FORMAT() formats a date as specified in the argument. A list of format specifiers given bellow may be used to format a...
Read more >
The Ultimate Guide To MySQL Date and Date Functions
In this tutorial, we will introduce you to the MySQL DATE data type and show you some useful date functions to handle the...
Read more >
MySQL DATE_FORMAT() Function - W3Schools
Parameter Values ; %D · Day of the month as a numeric value, followed by suffix (1st, 2nd, 3rd, ...) ; %d, Day...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found