shortname DATE not working

Questionsshortname DATE not working
Md JaHidur Rahman asked 9 years ago

i write like that. but its not working.

$grid["sortname"] = "STR_TO_DATE(date,'%d-%m-%Y')"; //IN DATABASE DATA LIKJE 10-03-20185
$grid["sortorder"] = "ASC"; // ASC or DESC

1 Answers
Abu Ghufran answered 9 years ago

Functions inside sortname is not supported. However, you can make another field in select_command e.g.

SELECT …. str_to_date(invdate,'%m-%d-%Y') as test ….

And use this 'test' field in sortname. As order by works in last by query processor, it should work.

Your Answer

11 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?