Skip Navigation

[Resolved] I would liek to test a date custom filed

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by fulvioT 4 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1553389
test-data.png

I created a custom field"data-documento" as date.
Now I would like to present on a page only the post that has data-documento = 15 July 2019

I tried to do a condition output with
[wpv-conditional if="( $(wpcf-data-documento) eq 'DATE(07,15,2019)' )"]
but it doesn't work.
I tried to "eq 15/07/2019", "eq 43661", and other but anything works

I tried also with new filter procedure (see attachment) but it doesn't work too.

How can I test for a specific date?

thankyou
fulvio

#1553747

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-03-17 at 9.52.57 AM.png

Hi Fulvio,

Thank you for getting in touch.

The easiest way to do this is to convert your date to a timestamp
hidden link..69i57j33.4269j0j4&sourceid=chrome&ie=UTF-8

Then you go to the filter that you've added and set it to NUMBER equal to CONSTANT, See Screenshot for example.

Please try it like this and let me know if it helps.

Thanks,
Shane

#1554457

Thank you
It works !!!!!