question

kauan pedroso avatar image
0 Likes"
kauan pedroso asked Jason Lightfoot commented

how to filter difference time

Olá, pessoal !

Tenho um modelo em flexsim onde puxo dados de uma tabela global que possui horários de entrada e saída e um script que calcula a diferença entre eles. Gostaria de saber como faço para filtrar os valores de diferença colocando a faixa mínima e máxima destes valores. I tried to use this code but it didn't work.

1682595991561.png1682596016100.png

FlexSim 21.2.4
global tabledifferencerange
1682595991561.png (2.8 KiB)
1682596016100.png (4.1 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented
In SQL it's 'AND' not '&&'
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

kauan pedroso avatar image kauan pedroso commented ·

I tried with AND and it didn't work.

1682605362200.pngI tried that way and it had a problem too.

1682605721193.png


0 Likes 0 ·
1682605362200.png (3.1 KiB)
1682605721193.png (3.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ kauan pedroso commented ·
I don't like that you're overwriting your data, but hey.


In the first snapshot you missed out Difference from the <=36 test condition - you've written it as a sentence rather than SQL logic.

In the second snapshot you're trying to access datetime methods without casting it as Datetime as we've shown you in numerous previous examples.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.