Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: branch on comparsion to Dusk Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 20 2011 at 09:41 | IP Logged Quote jeffw_00

This is probably an easy one for someone who has done it.

Does anyone know the syntax for branching on Dusk. for example, what I want to do is

Jump if (Dusk < 7PM,1,3)

not sure how to code the "Dusk < 7PM"

thanks!
/j

Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 20 2011 at 13:31 | IP Logged Quote grif091

[DUSK} is the number of seconds past 00:00 when dusk occurs. I think 7PM is 19:00 * 60 * 60 for seconds to 7PM.

if([DUSK} < 68400,1,3)


Edited by grif091 - February 20 2011 at 13:31


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 20 2011 at 14:31 | IP Logged Quote jeffw_00

Thanks - is there a way to test if(today = monday?)
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 20 2011 at 19:04 | IP Logged Quote BeachBum

IF (DAYNUMBER(TODAY()) = 2 ,"Monday", "NO")

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 20 2011 at 19:58 | IP Logged Quote jeffw_00

thanks
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 21 2011 at 11:40 | IP Logged Quote dhoward

For the dusk comparison, you can also use:

if(ph_getsuntime(today(),4) < 19:00:00,1,3)

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 21 2011 at 12:32 | IP Logged Quote jeffw_00

THANKS DAVE
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 21 2011 at 14:23 | IP Logged Quote BeachBum

And for Monday I guess it would be:

if(ph_getsuntime(today(),4) < 19:00:00 and DAYNUMBER(TODAY()) = 2,1,3)



__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum