Skip Navigation

[Resolved] displaying "from" – "to" doesnt work

This support ticket is created 2 years, 5 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)

This topic contains 3 replies, has 2 voices.

Last updated by larsP-2 2 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#2374011
Image 002.png
Image 001.png

Hello,

we've got a page for events where we display the date when the event will start and end.

For example:
In the backend we entered the date from June 9, 2022 to June 11, 2022
but in the frontend it only show the "from date" -> June 9, 2022

Can you tell me what is causing this error?

Thanks in advance!

#2374145

Shane
Supporter

Languages: English (English )

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

Hi Lars,

Thank you for getting in touch.
Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.

Thanks,
Shane

#2374517

Shane
Supporter

Languages: English (English )

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

Hi Lars,

Thank you for the credentials.

This should now be working. The issue was that you were trying to compare the dates in their text formats rather than the timestamp.

It's much easier to compare as a timestamp since this is a numerical value. Take a look at the conditional below.

    [wpv-conditional if=" '[types field='veranstaltung-ende' output='raw'][/types]' gt '[types field='veranstaltung-beginn' output='raw'][/types]' "]

Take not of the output='raw' as this is what is used to display the value that is stored directly in the database. In the case of date fields this raw value would be a timestamp.

Thanks,
Shane

#2375055

My issue is resolved now. Thank you!