# How to compare two integers?

**URL:** https://www.finalbuilder.com/forums/t/how-to-compare-two-integers/4317
**Category:** Discussion
**Created:** [July 4, 2008, 8:50am UTC](https://www.finalbuilder.com/forums/t/how-to-compare-two-integers/4317 "2008-07-04T08:50:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![matthiaskramer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@matthiaskramer](https://www.finalbuilder.com/forums/u/matthiaskramer)
#### Post date: [July 4, 2008, 8:50am UTC](https://www.finalbuilder.com/forums/t/how-to-compare-two-integers/4317/1 "2008-07-04T08:50:25Z")

</div>

Hi, i try to compare two integers.

I have to run a part of a script if the current time is later than 11pm and i do i that way:

Variable "DatumStunde" is set with "GetDateTime" and "hh" so its "08" for example. Then i use "If DatumStunde \> 22"... and there is the problem, because its true for automise. So how can i solve that, please?

Greetings

NB

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [July 4, 2008, 8:55am UTC](https://www.finalbuilder.com/forums/t/how-to-compare-two-integers/4317/2 "2008-07-04T08:55:09Z")

</div>

Try using a Set Variable action (on the DatumStunde variable with the “Use existing value” checkbox) before the compare and force the type to integer.

---

<div class="post-metadata">

### Author: ![matthiaskramer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@matthiaskramer](https://www.finalbuilder.com/forums/u/matthiaskramer)
#### Post date: [July 4, 2008, 9:50am UTC](https://www.finalbuilder.com/forums/t/how-to-compare-two-integers/4317/3 "2008-07-04T09:50:22Z")

</div>

Thank you for the very fast help.

I have done it now with a script on the AfterAction of GetDateTime "DatumStunde".

if DatumStunde \> 22 then DatumStundeOK = True

it works now but thank you anyway.

regards

NB
