- πΊπΈUnited States tlwatson
For anyone else trying to do this, yes it's possible with Custom Text. First make sure that the fields are currently outputting a Twig-readable date format (the HTML full date/time worked best for me). Then use the date filter to convert to UTF format, so Twig knows what it's doing "math" on. Like:
{{ field_cp1_time_out|date('U') - field_cp1_time_in|date('U') }}
What you'll get here is a UTF-dated value difference in seconds. You can then reformat it back to whatever you want with the date filter, such as minutes / seconds:
{{ (field_cp1_time_out |date('U') - field_cp1_time_in|date('U'))|date('i:s') }}
I tend to write this out in a longer form in the view to make it more legible, but there's the gist of it. You may have to specify timezone if it's not cooperating.