jdu98a Posted April 17, 2008 Posted April 17, 2008 I am using the DoScript plug-in by myFMbutler to execute a script based on the current time. The following calcs result in the following returns in Filemaker 8 Advanced. ## If the current time is 12:30 AM ## If ( Get ( CurrentTime ) > "12:00:00 AM"; "yes"; "no") RETURNS - yes If ( Get ( CurrentTime ) > "1:00:00 AM"; "yes"; "no") RETURNS - yes If ( Get ( CurrentTime ) > "2:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "3:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "4:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "5:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "6:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "7:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "8:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "9:00:00 AM"; "yes"; "no") RETURNS - no If ( Get ( CurrentTime ) > "10:00:00 AM"; "yes"; "no") RETURNS - yes If ( Get ( CurrentTime ) > "11:00:00 AM"; "yes"; "no") RETURNS - yes 24 hour notation (00:00:00) returns yes for every time until 13:00:00 What format do I need to have the variable time in order for filemaker to recognize it correctly? This is driving me nuts. :
jdu98a Posted April 17, 2008 Author Posted April 17, 2008 Well nevermind... I just had to use GetAsNumber(Get(current time)) as well as retrieve the variable time as a number. Sometimes all you have to do is take the time to ask someone about a problem and BINGO you figure it out on your own.
Fitch Posted April 17, 2008 Posted April 17, 2008 Just FYI: Get(CurrentTime) > "3:00:00 AM" // result: 0 Get(CurrentTime) > Time( 3; 0; 0 ) // result: 1 Welcome to the forums!
Recommended Posts
This topic is 6124 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now