function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vikram_infavikram_infa 

How to create custom field of type TIME datatype which recently got added in 13.0 API or later

How to create custom field of type TIME datatype which recently got added in 13.0 API or later. For example there is a object by name 'BusinessHours' which has fields of type TIME. Is it possible to create a customfield of type TIME(not to be confused with DATE/TIME) datatype.
 
Any help will be appreciated....
 
Thanks
Vikram
mikefmikef
So Time is a standard data type that is not exposed to custom fields.
Please post your business use case, what you are trying to do.

You can use a combo of a date time field and a formula field to display just the time, or duration of two fields.
But without knowing what business problem you want to solve it's difficult to give a suggestion for a solution.
DaifungDaifung

I have the same issue, I need to track working hours for contacts. I'd like to have a custom object that is a child of Contact with fields for Day, start time and end time. Yes, a formula field could display only the time, but entry would still be extremely counterintuitive.

 

The current option is seperate hour and minute fields for each time, but then reporting and calculations will be somewhat complicated.

Rob Lofaro.ax214Rob Lofaro.ax214

Can you explain how you'd use a formula field with a date/time field to obtain just the time? 

Use case: trying to calculate duration of a case in business hours.  The case start time must be used in a calculation against 5pm to determine hours open in that first day, but I cannot seem to create a formula to get the start time only from the date/time field.

 

Any thoughts would be helpful!