Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Formating time input fields

Avatar

Level 2

I'm using the {short.time} format (HH:MM) as input fields on a form.  99% of the people understand that they need to use the : - it's the last 1% that brings me here.  How do I go about either forcing them to use the HH:MM format or making my form accept their HHMM input ??  If they use the HHMM format, my time calcs don't work properly. 

THX ..........

0 Replies

Avatar

Level 10

Hi,

In the Patterns dialog, set:

Display to time{HH:MM}

Edit to time{HH:MM}|time{HHMM}

Data to time{HH:MM}


The additional pattern for the edit, will allow a user to input the time without the colon, but will automatically set it to the right display and data format.

Hope that helps,

Niall

See here as well: http://forums.adobe.com/message/3706212#3706212

Avatar

Level 2

All well and good ....... BUT ....... when I get into my time calcs, things aren't quite right. By setting the Patterns as you suggest, when I calculate daily hours, the minutes are getting dropped off the time fields. IE: 07:00 AM becomes just 07. I've changed the patterns in my result field, changed the parameter "HH:MM" to "HHMM" and a few other things - and no success.

Is it just an Adobe thing ??

John Rojowski

DFAS/IND DJMS-AC SIT

Phone:  317-212-7470

"Simplify."

Avatar

Level 10

How does your calculation script look like?

Avatar

Level 2

M1T = ((TOut - TIn - 1800000) / (60 * 60 * 1000))

And I get TIn and TOut by: Time2Num(W1TS, "HH:MM")

W1TS has its patterns defined as you mentioned in your 1st reply. I'm subtracting 30 minutes as a lunch period.

John Rojowski

DFAS/IND DJMS-AC SIT

Phone:  317-212-7470

"Simplify."