Input date time format 2

Hello,
I have the same problem as described in this post
https://community.home-assistant.io/t/input-date-time-format/34838
Unfortunately the solution given in this post (dec 2017) does not work actually with latest Hassio version.

{{states('input_datetime.start6')}}
{{ states('sensor.time')}}

1 gives format : HH:MM:SS

2 gives format HH:MM

So impossible to compare the 2 states
How can I format the input_datetime to HH:MM ?
Thanks in advance for your attention
Patou

It’s possible by slicing the string to return just the first 5 characters:

{{ states('input_datetime.start6')[:5] }}

Example:

Ok thanks and good night