Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Time in hh:mm on a field in form

(0) ShareShare
ReportReport
Posted on by 87

Hello,

I am making a form that contains a field in which hours and minutes are entered. In this field I want to enter weekly hours, therefore a number of hours greater than 24. But, I want to respect that the minutes do not exceed 60. For example, 60 hours and a half, it should be 60:30 instead of 60:50.

I can't find any dataype that meets the requirement, the closest one is TimeHour24 but it doesn't support values greater than 24. I have thought about using strings but I don't think it is the best idea to make calculations.

Any advice?


Thanks.

  • Eisenberk Profile Picture
    Eisenberk 87 on at
    RE: Time in hh:mm on a field in form

    Thanks Martin, I used a String, then validated it with Regex.

  • Deepak Agarwal Profile Picture
    Deepak Agarwal 8,566 on at
    RE: Time in hh:mm on a field in form

    Hello,

    You can try to use a real data time along with a help text which may say an example of entering data like 60.50 instead of 60.30 or vise versa, and validate the value. You can explore Project timesheet form.  

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 231,409 Most Valuable Professional on at
    RE: Time in hh:mm on a field in form

    I suspect that you'll indeed need to use a string. It might be a string display method validating the data and saving it as a numeric field under the hood.

    You could also create a custom control, but I wouldn't do it. While it might do a great job at the moment, you won't be able to upgrade it to F&O.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans