Tell us what you are trying to do?
I want to compare start and end datetime just by date not by time.
my View Template:
[wpv-post-link]
[types field='kurs-kurzbeschreibung'][/types]
[wpv-conditional if="( $(wpcf-kurs-start) eq $(wpcf-kurs-ende) )"]
[types field="kurs-start" index="0"][/types]
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-kurs-start) eq $(wpcf-kurs-ende) )" evaluate="false"]
[types field="kurs-start" index="0"][/types]
bis [types field="kurs-ende" index="[types field='kurstage' output='raw'][/types]"][/types]
[/wpv-conditional]
at "[wpv-conditional if="( $(wpcf-kurs-start) eq $(wpcf-kurs-ende) )" i just want to compare the date and not the datetime to control if start datetime and end datetime is at the same day.
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site?
the result is on the page
hidden link
http protection: toolset:562VFHjfv
The last entry should just have one Date, but as start-time and end-time are not equal it shows the same date twice.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Well - what if you try to check the date field using the Types shortcode.
For example:
[wpv-conditional if="( '[types field='kurs-start' style='text' format='F j Y'][/types]' eq '[types field='kurs-ende' style='text' format='F j Y'][/types]')"]
// add your code here
[/wpv-conditional]
The first one seems to be allways true?!
hidden link
can it be it's because of the brakets " ' ' ' ' " ?
[wpv-conditional if="( '[types field='kurs-start' style='text' format='F j Y'][/types]' eq '[types field='kurs-ende' style='text' format='F j Y'][/types]')"]
course with one day
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-kurs-start) eq $(wpcf-kurs-ende) )"]
[types field="kurs-start" index="0"][/types]
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-kurs-start) eq $(wpcf-kurs-ende) )" evaluate="false"]
[types field="kurs-start" index="0"][/types]
bis [types field="kurs-ende" index="[types field='kurstage' output='raw'][/types]"][/types]
[/wpv-conditional]
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Sorry - I need to know here is the kurs-start and kurs-ende fields are repeating fields?
If yes, what index you want to match to compare the start and end date?
In addition to that, I do not able to open the link you shared. I get the following error:
When I checked with one of my colleagues, for him the link you shared works fine. Is there any IP restrictions?
No restrictions as far as i know.
Yes both are repeating fields.
With index="[types field='kurstage' output='raw'][/types]"] i match the last index for kurs-ende (course ende)
This works fine. kurstage= course days (-1) so that „0“ is course with one day wich will have just on daytime els the should get starting and end day.
Greetings Torsten
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
With index="[types field='kurstage' output='raw'][/types]"] i match the last index for kurs-ende (course ende)
==> so, using above we get the end date for the field "kurs-ende" - do we also need to use index for start date field as well? what index we need to check for start date field - is it 0 index for start date field?