1. I have mass data/row which is same date with the last record,
as you example, my data would be like that
01/09/2022
06/10/2022
06/10/2022
06/10/2022
04/10/2022
05/11/2022
05/11/2022
05/11/2022
05/11/2022
...
the data were keep update and insert new date every day.
then, I want to display all the last day data eg.05/11/2022 only when load the page. I'm appreciate with your Filtering and the placehold funtion, but it seems no help for my issue....
is that possible to add a mysql query for the placehold function page?
eg.select date from table order by date desc limit 1
2. date range still need user to input value... i want to use a date picker for date selection! hopfully you can add this into next update!
- 1. I was not aware that you would have multiple rows with same date, thank you for clarifying that.
If you wish to keep the date picker as the filter type,
but to predefine to sort/order from the latest date, my best idea will be to set this Date column to sort the table by, and as descending order, then it will start showing rows from the latest date, and then to descend to later dates beneath, like this :
- The user will also be able to set the Date Range filter after table loads.
-
I will ask our senior Team to see if they have a better solution at the moment,
and we will report back on it.
Let me know if that helped for the time being? Thanks
Once again my apology for the waiting time for the replies.
-
I hope you will find a workaround to achieve your use-case solution.
As you see, at this time i am trying to devise ideas to make a solution, but what i suggested so far is the best we can do at the moment.
We will do our best to create more solutions in the future, of course.
-
If you need to try a custom solution, we can only recommend reaching out to WP Kraken, they do quality custom work with our plugins, but i just can't advise on their prices.
-
2.
No, unfortunately at this time it is not possible to add a time zone to the %current date% with any built-in features.
As you pointed out, that placeholder will pull the time zone from the currently set WordPress time zone.
Currently, we don't have any solution for that either, but i like this idea for improvement.
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
(In MySQL the CONVERT_TZ() returns a resulting value after converting a datetime value from a time zone specified as the second argument to the time zone specified as the third argument. This function returns NULL when the arguments are invalid)
-
For example, we had a user who started with a Query like this :
( i will just point out the part pulling the date column and leave other columns from the Query)
SELECT
CONVERT_TZ('2020-12-01 01:00:00','+00:00','+02:00')table_name.`slot_start`
FROM table_name
Then a colleague suggested he should change it to this :
SELECT
CONVERT_TZ(slot_start,'+00:00','+02:00') AS Slot_Start
FROM table_name
and it worked for that user.
Of course, you can change it to different time zone, depending on what you need.
Instead of using %CURRENT_DATE% at the field of "Predefined value(s)", I want to set the date of last row of my database table, how can I do it?
sql would like that, select date from mytable order by date desc limit 1
Also, is that possible to set the input type of "Predefined value(s)", such as a date picker?
Hi, moscorp
Thanks for reaching out to us
-
1.
I think you should be able to achieve this by limiting the rows of the table to show only 1 row,
you can do that in the table's Display tab :
Set 1 row to display,
hide pagination , pagination info, and hide the ability for users to change amount of rows on page, like this
Then set table to sort by this column, and descending order - that way it will just present the latest date row.
If i have a table like this - and i set everything up
In the end it will look like this
Let me know if that works for your use-case?
-
2.
The only way to currently get a date picker in filtering for the Date column,
is if you use a date range, or dateTime range:
Let me know if you have any questions. Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello, thanks for reply!
1. I have mass data/row which is same date with the last record,
as you example, my data would be like that
01/09/2022
06/10/2022
06/10/2022
06/10/2022
04/10/2022
05/11/2022
05/11/2022
05/11/2022
05/11/2022
...
the data were keep update and insert new date every day.
then, I want to display all the last day data eg.05/11/2022 only when load the page. I'm appreciate with your Filtering and the placehold funtion, but it seems no help for my issue....
is that possible to add a mysql query for the placehold function page?
eg.select date from table order by date desc limit 1
2. date range still need user to input value... i want to use a date picker for date selection! hopfully you can add this into next update!
thanks,
Hi, moscorp
Sorry for the delay
- 1. I was not aware that you would have multiple rows with same date, thank you for clarifying that.
If you wish to keep the date picker as the filter type,
but to predefine to sort/order from the latest date, my best idea will be to set this Date column to sort the table by, and as descending order, then it will start showing rows from the latest date, and then to descend to later dates beneath, like this :
- The user will also be able to set the Date Range filter after table loads.
-
I will ask our senior Team to see if they have a better solution at the moment,
and we will report back on it.
Let me know if that helped for the time being? Thanks
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello,
Thank you for reply!
I think I have to do some other thing to achieve my needs...
by the way, is that possible to set the date in filter default %current date% +UTC? Because the server time is different with my area..
Hi, moscorp
Once again my apology for the waiting time for the replies.
-
I hope you will find a workaround to achieve your use-case solution.
As you see, at this time i am trying to devise ideas to make a solution, but what i suggested so far is the best we can do at the moment.
We will do our best to create more solutions in the future, of course.
-
If you need to try a custom solution, we can only recommend reaching out to WP Kraken, they do quality custom work with our plugins, but i just can't advise on their prices.
-
2.
No, unfortunately at this time it is not possible to add a time zone to the %current date% with any built-in features.
As you pointed out, that placeholder will pull the time zone from the currently set WordPress time zone.
Currently, we don't have any solution for that either, but i like this idea for improvement.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi, moscorp
Just following up on the subject of setting/changing the date data time zone.
I got advised by our 2nd level Team on that.
The plugin pulls the data from your database, and all database entries are saved in UTC+0 time zone.
You would need to change it in the SQL query you're building the table by using the
MySQL CONVERT_TZ() function :
CONVERT_TZ (dt, from_tz,to_tz)
(In MySQL the CONVERT_TZ() returns a resulting value after converting a datetime value from a time zone specified as the second argument to the time zone specified as the third argument. This function returns NULL when the arguments are invalid)
-
For example, we had a user who started with a Query like this :
( i will just point out the part pulling the date column and leave other columns from the Query)
Then a colleague suggested he should change it to this :
and it worked for that user.
Of course, you can change it to different time zone, depending on what you need.
-
Let me know if that helped. Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables