Time Entity

0
Hi, how I can create a time attribute inside an entitiy? I know there is a data type date and time, but it only returns date value in a certain format. I want to show my attribute as a time value in HH:MM:SS format. My end goal is to have total three attributes: Start Time Finish Time Time Taken Time taken will be calculated as Finish Time – Start Time. Therefore, I need to show time in my attribute, not date. How can I do it? Kindly help
asked
2 answers
1

Mendix has choosen to only provide type DateTime as an option. There is no option for just the time. For your requirement:

- for Start time to your entity add an attribute of type datetime

- for Finish time to your entity add an attribute of type datetime

- for TimeTaken to your entity add an attribute of type decimal and calculate the time taken using the function millisecondsbetween, see https://docs.mendix.com/refguide/between-date-function-calls#2-millisecondsbetween

 

answered
1

you can display your date time attributes on the front end using custom format to display only time.

answered