3

I am trying auto fill time field while creating new record.

my field as here what i want to show

What i want to show

but i am getting like this

my field data type is time

i am getting like this

i am using default value

enter image description here

2

I noticed Salesforce lighting supporting this feature with AM and PM via picklist but in classic you have to enter value manually.

Just see the same field in lighting and classic you will come to know the difference.

  • This does not answer the original question. The problem is that time doesn't show correctly when the Time fields has the default value. – Eduard Aug 8 '18 at 8:12
  • Yes it's not showing correct value.. it's a classic feature, the same will work on lighting, that's what I mentioned – Prem Anandh Aug 8 '18 at 8:17
2

In Salesforce Classic, there is no way you can change the display format of time field to AM/PM at the time of editing. However, when you save your record it will show the time in AM/PM format.

In lightning, you can see AM/PM format while editing records.

When using Apex, You can change formats of time field while editing.

Moreover, In formula field you have used:

TIMEVALUE( TIMENOW() )

and this is wrong. You cannot use TIMEVALUE() on a TIME field because TIME field's value is already in TIME format.

So you only need to write this:

TIMENOW()

Reference: Refer to Time TIMEVALUE() function here

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.