# timeFormat HH:mm in Cake4

**URL:** <https://discourse.cakephp.org/t/timeformat-hh-mm-in-cake4/9165>\
**Category:** Uncategorized\
**Created:** [March 26, 2021, 8:55am UTC](https://discourse.cakephp.org/t/timeformat-hh-mm-in-cake4/9165 "2021-03-26T08:55:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirk](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dirk/32/2174_2.png) [@dirk](https://discourse.cakephp.org/u/dirk)\
**Post date:** [March 26, 2021, 8:55am UTC](https://discourse.cakephp.org/t/timeformat-hh-mm-in-cake4/9165/1 "2021-03-26T08:55:53Z")

</div>

I try to create a form where the user can enter hours and minutes. If there is already a value in the database for the given day, I want to show this value as preset.

`echo $this->Form->time('businesshours['.$weekday->id.'][start_hour1]',['type'=>'time','label'=>false,'min'=>'00:00','max'=>'24:00','required'=>'false','step'=>'60','value'=>$weekday->businesshours[0]->start_hour1->i18nFormat('HH:mm')]);`

For example, if start\_hour is “10:30”, I expected a input field like “10:30” , but what I get is a input field like “10:30:00”.

Does anyone know what I need to change?

Best regards  
Dirk
