Time check - Macro with output depending on current time  SOLVED

User-to-User discussion about the PhraseExpress macro programming.
Post Reply
maallard
Posts: 23
Joined: 14 Jul 10, 03:49

Time check - Macro with output depending on current time

Post by maallard » 20 Jan 22, 14:57

Hi !

I'm trying to figure out a way to create a macro that would output a different value according to the current time :

If the current time < 14:30 → thent output = GO DOWN
If the current time >= 14:30 (2:30 pm) → then output = GO UP

I tried check value, but it does not work.

{#check -text {#datetime -f hh:nn -variablename Date/Time} -case >= 14:30 -output Go UP -else Go DOWN -variablename Timecheck}

Any idea to make it work ? Thanks !

Technical Support
Posts: 3216
Joined: 10 Feb 06, 22:23

Post by Technical Support » 20 Jan 22, 15:28

This should do it:

Code: Select all

{#check -text {#datetime -f hhnn} -case >= 1430 -output Go UP -else Go DOWN  -variablename Timecheck}

maallard
Posts: 23
Joined: 14 Jul 10, 03:49

Post by maallard » 20 Jan 22, 15:31

Ahhhhh .. so happy!! Thank you so much for answering that quickly !

Post Reply