Skip to main content
Italian4215
Inspiring
February 12, 2016
Question

Custom Time format - value of field not equal to change made

  • February 12, 2016
  • 2 replies
  • 799 views

I have a field that has a custom time format of HH:MM:ss tt which be default is Military time. therefore if a user enter 01:20:11 pm it will change to 13:20:11 pm however, the value of the field is still what the user entered 01:20:11 pm. How do I get the fields value to equal what it changed to?

This topic has been closed for replies.

2 replies

Inspiring
February 13, 2016

Military time format woks with hundreds hours and has no ":" separator. Civilian 24 hour time format uses the ":".

I would use the Civilian 24 hour time format because not Military time format is treated as an IEE floating point number and not a character string which makes computations more complex and harder to work with.

Italian4215
Inspiring
February 15, 2016

I'm using Civilian 24 hour time. the way the format works for 24 hour time is...

if user enter 03:20:20 pm it will convert the display to 15:20:20 but the value of the field will still be 03:20:20. I need the value of the field to equal what it displays, so for this example 15:20:20. I need the value to change as well as display, not just the display. I am pulling info from this field with another program and I need it to be military time for the value since I am pulling that info.

Inspiring
February 15, 2016

Then you need to force the value of the field to the desired value and format.

try67
Community Expert
Community Expert
February 12, 2016

Use "hh" instead of "HH". It doesn't make sense to have both a 24 hours

time (HH) and am/pm indication (tt) in the same string...

On Fri, Feb 12, 2016 at 7:56 PM, Italian4215 <forums_noreply@adobe.com>

Italian4215
Inspiring
February 15, 2016

Okay I removed the tt from the custom time format.