0

I have a time field (new time field format) called Time_In_1__c in a visualforce page. When I enter a value such as "3:00 pm" and hit save, Salesforce displays the value as 15:00:00:000. I've come across some solutions using outputtext to format, but I'm unsure how to work with an inputfield and format that. I've seen some suggestions to format in the controller, but I'm a novice coder and would need a bit of help with that the visualforce and apex. I would like the field to display in 12 hr format ("3:00 pm").

Currently I'm referring to the field in Visualforce with:

<apex:inputfield value="{!TSE.Time_In_1__c}"  />

Any help is appreciated.

1 Answer 1

0

From the help-pages: A time field displays a value based on your organization’s Locale setting on the Company Information page in Setup. https://help.salesforce.com/articleView?id=custom_field_time_overview.htm&type=5

1
  • The organizations Local setting are correct. This seems to be more about getting visual force to display correctly as the values display correctly in a standard Salesforce page.
    – Collen
    Sep 3, 2020 at 15:58

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.