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
BedrockMission!

Learn More

View all

Sign in to view all badges

Time In/Time Out/ Total Time Question

Avatar

17-06-2008

I have read MANY posts in regard to changing regular time to Military time. The problem that I seem to be having is that I can't NOT use Military time. I have tried h:MM A format, but it doesn't work. I want the ability to enter in, for example, 8:00 AM for Time In, 12:00 PM for Time Out, and for the form to have 4:00 as the Total Time, but it's not working. Currently, I have the following for the display pattern, edit pattern, validation pattern and data pattern. Many of you are talking about re-writing the information in the XML source area, I don't have the knowledge for that. Any help that you can offer would be greatly appreciated, thanks!

display pattern: HH:MM A

edit pattern: HH:MM

validation pattern : HH:MM A

data pattern: HH:MM A

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

18-06-2008

Firstly doing any kind of adding of time or dates is always trickier than it seems. You will have to use the formcalc functions that will convert a time to a number that represents the number of milliseconds that have elapsed since a set point in time. This function is the Time2Num and Num2Time function. This allows you to calculate the difference in the two times in milliseconds and then convert back to what you want to display.



Now to your original question. I think it is best to understand what those 4 patterns are refering to.



The Display Pattern is the way that the user will see the time on the screen.

The Edit Pattern is the format that you will allow the user to enter into the field.

The Validation Pattern is the format that will be used when validations are done (should be the same as edit pattern)

and finally Data Pattern is the format that will be used when the field is written to a data file or contents of the field is asked for.



This technique allows you the flexability to display to the user a time like 9:24 AM but have military time written to the data file or used when calling the value of the field in a calculation.



If you want to post your email address I will send you a simple sample I put together to show what you are trying to do.

Avatar

18-06-2008

Wow, I don't think I understood half of what you said! My email address is Jpeel@ufgcorp.com.



Thank you explaining the patterns, as I didn't really understand what those were for.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

18-06-2008

Just sent you a sample

Avatar

18-06-2008

Thanks for your help Paul, I couldn't have understood the whole "Time In/Time Out thing without your help. This Forum is in my favorites now so that I can get all of my questions answered!



Jessica

Avatar

Avatar
Validate 1
Level 1
deannehsts007
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
deannehsts007
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
deannehsts007
Level 1

05-06-2009

Hello I was reading your post and was wondering if you still had the information that you sent to Jessica. that is exaclty the formcalc I am looking for  would greatly appreciate it if you could post the formcalc that you emailed to her.

thank you

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

08-06-2009

I don't have it nor do I remember what it was I did. That was at a time when the forum did not allow attachments so we may have taken it offline. If you want to state your case I may be able to pull something together for you.

Paul