Tag for time now

hi everyone, i want create a face that change color every 12 hours.
exampe: from sunset to sunrise and from sunrise to sunset.
i know formula for change a face every a right time (example: 6 hours),
but i don’t know which tag is used for have the time now.
my formula must be like this:

if timenow = sunset then use face1 (this is the formula for photo1, bright)
if timenow = sunrise then use face2 (this is the formula for photo2, dark).

thank to all.

There’s a couple of ways to do this…

There’s a tag called #DISDAYTIME# as seen in this tutorial:


$#DISDAYTIME#=1?100:0$
(For elements visible at the night use “0” (false) instead of “1” (true) in the condition)

You could do a check on #Da# as seen here: (AM/PM check)


$#Da#==AM?100:0$

Basically, you’re not checking the current time against anything, there’s tags defined as sunrise/sunset instead.

You can get more in depth/complicated if you want to count down to sunset/sunrise as seen here:

Here’s another thread that shows how it can be used and goes in depth some more:

Hope this helps!

1 Like

thank you very much for your help.
i have try the your: DISDAYTIME
when i move the cursor for accelerate the time, it work fine.
but i want know:
DISDAYTIME what report ??? sunset and sunrise time ? or what ?

the tag work fine! thank.

are also 2 tags for noon and midnight ???
or how to create them???
thank very much.

I’m not sure what it reports to be honest. I’m guessing sunset and sunrise times as you say.

If you want to check for noon or midnight you can set it to see if the hour is 12 or 24, I believe.

yes, thank.
i wanted create 4 faces (set, noon, rise, midnight).
i have use the disdaytime and work perfect for 2 faces (sunset and sunrise time).
if i want add other 2 faces (noon and midnight) in the formula
i must write +6 or what else ???
thank.

disdaytime, check if is sunset and sunrise ???