Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
930
24 hour time slot descriptor
posted

Hi,

I have a requirement to display all the time slot descriptions in a 24 hour format. Eg. either "1:00 pm" or "13:00" would suffice. Is this possible?

If not directly, then I guess a creation filter is the way to go?

Thanks!

Ryan

Parents
  • 69832
    Verified Answer
    Offline posted

    Note that it uses the time format specified by the current culture, so in cases where the current culture's time format uses "H" as opposed to "h", you get this automatically.

    If you want to force this regardless of the current culture settings, yes, you could use a creation filter. You can get the associated TimeSlot by using HourUIElement.GetAncestor(typeof(TimeSlotDescriptorUIElement)) to get the TimeSlotDescriptorUIElement, then accessing its FirstTimeSlot property.

Reply Children