SDT_TO_TOD problem - cast is missing

Begonnen von c3p0, 10. Februar 2010, 09:01:28

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

c3p0

Hi,

It seems that the SDT_TO_TOD function is missing a cast. To function properly the .SECOND part of the SDT-structure must be converted to a DINT. The compiler apparently realizes that the other parts must be converted (since they are multiplied by numbers larger than what an INT can hold)...

The correct conversion would be:

SDT_TO_TOD := DINT_TO_TOD(DTI.HOUR * 3600000 + DTI.MINUTE * 60000 + INT_TO_DINT(DTI.SECOND) * 1000 + DTI.MS);


dalbi

Hi c3p0,

thank you!  ;)

Greetings Daniel