1

We have a Date/Time field on a custom object which lets us choose the date (perfect!), but defaults the time as 12:00:00. We want it to default to 09:00:00.

I tried to go and change the default value (when editing the field) to be set as 09:00:00 every time, but it required me to pre-set a date - which should be chosen manually by the user.

How do I default the time only on this date/time field?

  • I believe you will need to create two field: one date and another Time and set the default in time field. You could create a formula field to show the two fields together, – m Peixoto Feb 21 '19 at 10:48
  • @mPeixoto Thanks for that. We don't want to create extra fields. Do you know why the time gets defaulted to 12:00:00 in SF? – Natasha Ali Feb 21 '19 at 11:21
0

I asked on the admin community and got a formula that works! Need to create a workflow rule that runs only when a record is created, the field update should be as below:

Formula

| improve this answer | |
  • Not sure this is really a good idea... what it means is that no matter what value is set (even if the user manually sets the time to the correct time, or even if it's copied in by Data Loader), the WF rule will adjust it 9 hours forward after the user saves the record. – Charles T Feb 21 '19 at 13:56
  • I agree that it is different from default. You will set always the same value... – m Peixoto Feb 21 '19 at 14:40
  • But the workflow is only run when the user record is created. On the rare occasions where they need it to be different, they can go into the record and amend the date – Natasha Ali Feb 21 '19 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.