Time calculation - full hours aren't calculated correctly

markush32574551

24-04-2018

Hey,

I have a little issue. I was programming a time calculation (dynamic) table and yesterday everything worked, but today no full hours are calculated correctly.

I tried then to display the hour as a decimal number using following script:

this.rawValue = Time2Num(cellabove.rawValue, "HH:MM", "en_GB")

But this happened and I don't know why. I can repeat it for every full hour.

1472440_pastedImage_0.png

1472459_pastedImage_1.png

All times are entered in text fields, but when I change it to time fields it makes no difference and yesterday it worked with text fields.

I managed to get my script to work yesterday but now it only works for not full hours, what can I do?

var endT  = Left(Timeto_einf, 2) + Right(Timeto_einf, 2) / 60

var startT = Left(Timefrom_einf, 2) + Right(Timefrom_einf, 2) / 60

var breakT = Left(Break_einf, 2) + Right(Break_einf, 2) / 60

$.rawValue = (endT - startT - breakT)

Thank you in advance!

Best regards,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

markush32574551

24-04-2018

It needed 6 hours and I thought I it is impossible, but found the mistake:

I just needed to use the .formattedValue and everything works!

Well it's never easy, but always simple...

Still thanks!

Markus

Answers (0)