[Skip to main content](#vessel-content)

#   Feature request: support {time} in mass action filters on DATETIME columns (e.g.

##

- **[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")**
- [![Lumiga's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31479.png)](/forum/user/31479-lumiga "View Lumiga's Profile") Topic Author
- [ Offline](/forum/user/31479-lumiga)

Less More

- Posts: 641
- Thank you received: 26
-
-
-

2 hours 49 minutes ago [\#100000718](#100000718) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  *[Feature request: support {time} in mass action filters on DATETIME columns (e.g.](/forum/44-mass-actions/100000149-feature-request-support-time-in-mass-action-filters-on-datetime-columns-e-g#100000718 "-- Browser(s) name and version -- : Chrome 156.0  Hi,   I'm setting up a mass action on the User table to remove inactive customer accounts for GDPR data-retention purposes: users who haven't logged in for more than 7 years.   The filter &quot;User columns &gt; lastvisitDate  {time}-220903200&quot; fails with:   Incorrect DATETIME value: '1573952771'   {time} is replaced by a Unix timestamp, which works fine for HikaShop's own timestamp columns (user&#95;created, order&#95;created, ...), but lastvisitDate comes from the Joomla #&#95;&#95;users table and is aDATETIME column, so MySQL rejects the integer.   Workarounds I tried:  - A fixed value like 20191116000000 works, but has to be updated manually.  - A date string like &quot;2019-11-16 00:00:00&quot; is rejected with &quot;Wrong value&quot; because only numeric values are accepted for , =.  - REGEXP works but is also static.   Feature request:  When a filter value contains {time} and the target column is a DATETIME/DATE column (such as the Joomla user columns lastvisitDate and registerDate), please convert the calculated timestamp to 'Y-m-d H:i:s' before building the query. Alternatively, a dedicated filter such as &quot;Last visit older than X days&quot; would also solve it.   This would allow fully automated, cron-triggered retention clean-ups without manual maintenance, which is useful for many shops given GDPR requirements.   Thanks in advance!")* was created by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")*

-- Browser(s) name and version -- : Chrome 156.0

Hi, 

I'm setting up a mass action on the User table to remove inactive customer accounts for GDPR data-retention purposes: users who haven't logged in for more than 7 years. 

The filter "User columns &gt; lastvisitDate &lt; {time}-220903200" fails with: 

Incorrect DATETIME value: '1573952771' 

{time} is replaced by a Unix timestamp, which works fine for HikaShop's own timestamp columns (user_created, order_created, ...), but lastvisitDate comes from the Joomla #__users table and is a DATETIME column, so MySQL rejects the integer. 

**Workarounds I tried:** 
- A fixed value like 20191116000000 works, but has to be updated manually. 
- A date string like "2019-11-16 00:00:00" is rejected with "Wrong value" because only numeric values are accepted for &lt;, &gt;, &lt;=, &gt;=. 
- REGEXP works but is also static. 

**Feature request:** 
When a filter value contains {time} and the target column is a DATETIME/DATE column (such as the Joomla user columns lastvisitDate and registerDate), please convert the calculated timestamp to 'Y-m-d H:i:s' before building the query. Alternatively, a dedicated filter such as "Last visit older than X days" would also solve it. 

This would allow fully automated, cron-triggered retention clean-ups without manual maintenance, which is useful for many shops given GDPR requirements. 

Thanks in advance!

---

Kind regards,
Lumiga

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy8xMDAwMDAxNDktZmVhdHVyZS1yZXF1ZXN0LXN1cHBvcnQtdGltZS1pbi1tYXNzLWFjdGlvbi1maWx0ZXJzLW9uLWRhdGV0aW1lLWNvbHVtbnMtZS1nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
