Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

time calculation incomplete for seconds

$
0
0

I need the below to include seconds in the output field.  I have looked everywhere and I'm sure simple.  Please help.

 

if (HasValue(startsamplingtime) and HasValue(endsamplingtime)) then

var TimeDiff = (Time2Num(endsamplingtime.formattedValue, "HH:MM:SS") - Time2Num(startsamplingtime.formattedValue, "HH:MM:SS")) / (1000 * 60 * 60)

//truncate to hours

var HourDiff = Floor(TimeDiff/60)

//get minutes less than 60

var MinDiff = Mod(TimeDiff,60)

need seconds here

var SecDiff =

// build fomatted dispaly string

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

else

// if any values missing null the output

null

endif


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>