dubl Posted April 1, 2008 Posted April 1, 2008 (edited) I though this would be a breeze, but it is driving me batty. I need to change a layout between the hours of midnight and midday. In other words, if the current time is between midnight and midday, go to layout A, otherwise go to layout B. This is activated by a button, so I don't need any scheduling plug-ins or anything like that. My script currently reads: If(Get ( CurrentTime ) ≥ "00:00:01" and Get ( CurrentTime ) ≤ "11:59:00" then go to layout A Else go to layout B. So my machine time is 14:26 - when I run the script, it goes to layout A. When I look at Get(currentTime) in DataViewer, it shows 3:26PM - so maybe this has something to with 24-hour clock? I've tried using a Let function, but it still doesnt do what I think it should. I also tried using Get(CurrentTimeStamp). Any suggestions? Thanks Steve aka Dubl TaxiCab Manager Taxi Owner & Taxi Fleet Management Software www.taxicabmanager.com m: 0414 555 195ew Edited April 1, 2008 by Guest
Ocean West Posted April 1, 2008 Posted April 1, 2008 (edited) Try GetAsNumber ( Get(CurrentTime) ) Goto Layout A Else Layout B Filemaker stores time as seconds from 0 - 86399 since there are 86400 seconds in a day. Edited April 1, 2008 by Guest
Lee Smith Posted April 1, 2008 Posted April 1, 2008 Hi Dubl, long time no see. I think you need to use the Time Function as well Get ( CurrentTime ) ≥ Time ( 0 ; 0 ; 0 ) and Get ( CurrentTime ) ≤ Time ( 22 ; 0 ; 0 ) adjust the second time to what you need, Lee
mr_vodka Posted April 1, 2008 Posted April 1, 2008 (edited) Try this: Set Variable [ $t; Get ( CurrentTime ) ] If [ $t > 0 and $t < 43200 ] * Sorry didnt see the other posts. Edited April 1, 2008 by Guest
dubl Posted April 1, 2008 Author Posted April 1, 2008 Thanks Ocean, Lee and Mr. Vodka All good now - although at first I tried all three methods and it STILL wasn't working, until I realised that when changing my machine time to test it I had inadvertently set the time to AM instead of PM. DOH! Appreciate the quick responses very much :)
Recommended Posts
This topic is 6140 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