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
rob3000rob3000 

create separate fields for date and time on custom object

Dear all,

 

I created a custom object that is used for events. I would like to have a separate field for the start date and for the start time; just like on the standard event object.

 

Now the standard field type "date/time" behaves different; it allows to choose a date but it does not allow to select a time. 

 

Any ideas appreciated!

 

 

Bhawani SharmaBhawani Sharma

For this you can create a start date as Date field and Start time as picklist field. 
In picklist field you can put values from 01:00AM to 12:00PM.

 

rob3000rob3000

Thanks for the quick hint. I just tested this and there are some problems with a picklist:

1) the fields for date and time would be placed in different rows or columns, that doesn't really look good

2) Depending on the users settings the hours should be 24 or 12AM/PM

 

I'd really like to mimic the layout of the standard event datetime field...

PNA AdminPNA Admin

I would also like to know how to do this:

To create a custom date/time field that when in edit mode appears like the standard start time in an event. With the field showing up as essentially two fields: [Date ] [Time]