Thank you for sharing these details.
The three views that you referred to all are set to show the "Conference Member" posts. In the views which are showing the "Conference Member" or the "Church" posts, you can use the item attribute to show the custom fields from the related intermediary "Appointment" post:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
For example:
Appointment Date: [types field='ch-appmt-date' style='text' format='F j, Y' item='@appointment.intermediary'][/types]
Appointment term: [types field='ch-appmnt-term' item='@appointment.intermediary'][/types]
Appointment End Date: [types field='ch-appmt-end-date' style='text' format='F j, Y' item='@appointment.intermediary'][/types]
As for calculating the time difference between the two dates, you'll need a custom shortcode, for example:
function calculate_date_difference_func($atts = [])
{
$atts = shortcode_atts([
'start' => '',
'end' => '',
], $atts);
$timestamp1 = (int)$atts['start'];
$timestamp2 = (int)$atts['end'];
$hour = abs(($timestamp2 - $timestamp1))/(60*60);
return $hour." hour(s)";
}
add_shortcode( 'calculate_date_difference', 'calculate_date_difference_func');
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
Next, please add "calculate_date_difference" in the "Third-party shortcode arguments" section, at WP Admin -> Toolset -> Settings -> Front-end Content.
After that, you'll be able to use the shortcodes for the start and end date fields, inside this new custom shortcode, like this:
[calculate_date_difference start="[types field='product-start-date' output='raw' item='@appointment.intermediary'][/types]" end="[types field='ch-appmt-end-date' output='raw' item='@appointment.intermediary'][/types]"]
I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/