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

Not sure why this isn't calculating..

Avatar

Avatar
Level 1
missij99360262
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
missij99360262
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
missij99360262
Level 1

24-04-2015

Three columns...

In time

Out Time

Total Time (calculate based on in and out entered)

           <field name="hours1" w="18.182mm" h="10.04mm" access="readOnly">

                  <ui>

                     <numericEdit>

                        <border presence="hidden">

                           <?templateDesigner StyleID aped0?></border>

                        <margin/>

                     </numericEdit>

                  </ui>

                  <font typeface="Myriad Pro"/>

                  <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>

                  <para vAlign="middle" hAlign="center"/>

                  <border>

                     <edge/>

                     <corner thickness="0.1778mm"/>

                  </border>

                  <calculate>

                     <script>if( HasValue(spec1b) &amp; HasValue(spec1a) ) then

// compute time difference in minutes

var TimeDiff = (Time2Num(spec1b.formattedValue, "h:MM A") - Time2Num(spec1a.formattedValue, "h:MM A")) / (1000 * 60)

// truncate to hours

var HourDiff = Floor(TimeDiff / 60)

// get minutes less than 60

var MinDiff = Mod(TimeDiff, 60)

// build fomatted dispaly string

Concat( Format("Z9", HourDiff), ":", Format("99",MinDiff) )

else

// if any values missing null the output

null

endif

</script>

                  </calculate>

               </field>

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Level 1
missij99360262
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
missij99360262
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
missij99360262
Level 1

11-05-2015

Thank you!

On Mon, May 11, 2015 at 4:41 PM, jasotastic81 <forums_noreply@adobe.com>

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

11-05-2015

I'm almost ashamed to admit how long it took to figure this one out.

Your outputting the value to a numeric field. Change your field to a text field, and it works just fine.