New to Kustom, need help with time formatting

I’m trying to get something like this:

______________________

Last Feeding:

14:11

57 minutes ago

______________________

Last Feeding:

$tc(split, tc(split, gv(“info”), “T”, 1), “:”, 0)$:$tc(split, tc(split, gv(“info”), “T”, 1), “:”, 1)$

$tf(bi(plugged))$

______________________

info is a global variable returning a timestamp like 2026-04-17T14:11:32

______________________

But I can’t figure out how to make it a 12-hour clock.

Please help

  1. Create a Text Global named h:
    $tc(cut, tc(split, gv(info), “T”, 1), 2)$ and use this in your text
    $if(gv(h) > 12, gv(h) - 12, if(gv(h) = 0, 12, gv(h)))$:$tc(cut, tc(split, gv(info), “:”, 1), 2)$ $if(gv(h) < 12, AM, PM)$
1 Like