Support is online

import current date to virtuemart #8497

Open kostas7 opened this topic Monday, 12 September 2016 · 3 replies
Author

Hello,
Is it possible to import the current date to a Virtuemart custom field?
Thanks,
Best Regards,
Kostas.

Support

Hello Kostas,
If the VirtueMart custom field you are trying to import is of type date then you should be able to import the current date. If you are looking for anything more, post the sample import file to check.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Thanks, Tharuna,
Do I have to set the date manually (i.e 2016/09/12) each time I run the Import or there's a pattern like the "date("Y-m-d")" which I use in PHP scripts?
Best Regards,
Kostas.

Support

Hello Kostas,
There is no direct way currently to set pattern like "date("Y-m-d")" but there are two ways of doing it.

One way is that you can write your own rule plugin where you can use the date pattern like date("Y-m-d") and update your custom field.

Second is that In your import file, you have some custom text for date field and you can create a replacement rule, set this custom text in find field and replace it with the date you want in the replace field in the rule. And of course you need to change the date in the replace field in the rule every time you need to have the current date.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.