You have different options to combine data, it depends where you want to combine it, when, and where you want to output it.
I understand that you have 2 Fields (input) as Post Fields, they will show on the Backend of the Post Edit, and on the Toolset Form
When those fields are filled and the post saved or form submitted, you want to combine those 2 values and store that new value in another field (Simple text Field) and then output that somewhere.
You could create such "Simple Text Field".
To save data to the new Field, you would probably in your case use a PHP Snippet, hooked to either a Toolset Form API hook or a WordPress hook (generally save_post()). That snippet would get the value of the start and end date field, which as you recognized correctly is a Timestamp.
That can be converted to a date like you intend, and stored in a new field as a string to show on the front end later with the Field's ShortCode.
In a View, it can be used to query (however don't expect a date query for a string holding 2 humanly readable dates), and output as a ShortCode to see on the Front End.
However, maybe there is a much simpler approach, where you just display the information on the Front-end combining the values of the start and end date fields.
That is, if you do not need to store those dates but only show them in the format you outline.
Can you let me know the precise workflow that you intend to achieve?
Something like this I imagine should happen, but am not sure:
- Form or Post is saved with 2 Dates set in each a Toolset Date Field
- When this happens both dates are saved to a third single line field as a humanly readable date set
- That then is editable as a single string
If so, then it requires custom code.
The Hooks I elaborated are documented here:
https://toolset.com/documentation/programmer-reference/cred-api/
https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
To work with Timestamp and convert it:
hidden link
To get Toolset fields values you can either use the native WordPress get_post_meta() or the Toolset native types_render_field().
To update fields you always use update_post_meta().
https://toolset.com/documentation/customizing-sites-using-php/functions/
https://developer.wordpress.org/reference/functions/get_post_meta/
https://codex.wordpress.org/Function_Reference/update_post_meta
Please let me know if you need more help with, here is as well a reference to such a Custom Code Snippet applied to a Toolset Form:
https://pastebin.com/2BTbVbcs (Update Post Title with any field)
https://pastebin.com/A2UMXVUJ (Update Post Title with Timestamp as base data and converted)
Please consult these rules and Contractors (In case you need extended help) of Toolset Support related to custom code as well:
https://toolset.com/toolset-support-policy/
https://toolset.com/contractors/