How to get substring of a SearchKit result column? I want to truncate the event start time from 17:15:00
to just 17:15
.
What I have:
- My test setup is newest WP 6.3.2 and newest CiviCRM 5.66.0.
- CiviEvent: several events, with a starting date and time, e.g.
17:15
. - SearchKit: a search that gives me open events in the next 2 weeks.
The result presents no actions, no sorting, just a static table listing. - Form Builder: a form to hold the results from the search.
- WordPress: a page that contains the shortcode with my search.
What I want:
- The final output contains a column with event start time including seconds. It is silly to show an event start time with seconds - and I understand that this comes from the timestamp format in the database.
- I do not see any suitable field transformation that I could apply in the SearchKit.
- In the reports output part of SearchKit, each column has the
Rewrite Text
function using "SMARTY conditions" but it is not clear to me how that works. My latest attempt is[{TIME_start_date|substr:0:5}]
but that generates no output. Can you give an example? - I cannot think of another way to truncate the time value, or any way to do any kind of substring operation at all.
How can I get rid of the seconds in the time column?
(ignore the missing localisation of the weekday and month words)