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

#   Mass Action Using Date

##

- **[imthebige](/forum/user/45027-imthebige "View imthebige's Profile")**
- [![imthebige's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45027-imthebige "View imthebige's Profile") Topic Author
- [ Offline](/forum/user/45027-imthebige)

Less More

- Posts: 2
- Thank you received: 0
-
-

9 years 11 months ago [\#255930](#255930) by [imthebige](/forum/user/45027-imthebige "View imthebige's Profile")  *[Mass Action Using Date](/forum/44-mass-actions/887605-mass-action-using-date#255930 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  What is the best way to create a mass action using the current date. I have a custom field that has an expiration date and I would like to purge products that are after the expiration date using the current date such as:  purge products with custom field date ")* was created by *[imthebige](/forum/user/45027-imthebige "View imthebige's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4

What is the best way to create a mass action using the current date. I have a custom field that has an expiration date and I would like to purge products that are after the expiration date using the current date such as:

purge products with custom field date &lt; current date

Thanks!

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

9 years 11 months ago [\#255932](#255932) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass Action Using Date](/forum/44-mass-actions/887605-mass-action-using-date#255932 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  What is the best way to create a mass action using the current date. I have a custom field that has an expiration date and I would like to purge products that are after the expiration date using the current date such as:  purge products with custom field date ")*

Hi,

I'm afraid I don't know a good solution for that with a mass action.
The {time} tag which can be used to do such checks for order_created/order_modified, product_created/product_modified fields only works with unix timestamp fields and the custom fields don't use that type but a custom text format.

So in that case, it's better to run a MySQL query with your own cron task on your server.
[ stackoverflow.com/questions/21196613/run...-query-as-a-cron-job](http://stackoverflow.com/questions/21196613/run-a-mysql-query-as-a-cron-job)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84ODc2MDUtbWFzcy1hY3Rpb24tdXNpbmctZGF0ZT90bXBsPW1hcmtkb3du) 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.134 seconds

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

[](#top)
