dbTalk Databases Forums  

Simple If Satement with Date

comp.databases.filemaker comp.databases.filemaker


Discuss Simple If Satement with Date in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JC
 
Posts: n/a

Default Simple If Satement with Date - 11-13-2005 , 11:16 AM






I am trying to write a script where if the system date is a certain
date the program will exit. I've tried:

If
Get(CurrentDate)>12/01/2005
exit application
else
open(file)



I am trying to use this in the opening script.

Thanks
JC


Reply With Quote
  #2  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Simple If Satement with Date - 11-13-2005 , 12:04 PM






Not sure if you were simplifying things for the newsgroup, but you'd
certainly have to put "Date(12;1;2005)" because 12/01/2005 = 0.005985, and
additionally I might recommend

1) putting in a back door of some kind so that if you need to get in there
yourself after a given date (or just testing it out) that you aren't locked
out.
2) Exiting the application is a very bad idea in the case someone is working
with another FileMaker file or two. (Unless you're preparing a runtime I
guess) Better to just close the necessary files.
3) You should tell the user why the file is not opening.

Example:

If [(Get ( CurrentDate ) < Date ( 12; 25; 2005)) and (Get (
ActiveModifierKeys ) <> 4)]
Show Custom Dialog ["Access Prohibited"; "Do not open until Christmas!"]
Exit Application
End If

Allows the test to be bypassed by holding down Control key.

Bill

"JC" <jc (AT) jclewis (DOT) biz> wrote

Quote:
I am trying to write a script where if the system date is a certain
date the program will exit. I've tried:

If
Get(CurrentDate)>12/01/2005
exit application
else
open(file)



I am trying to use this in the opening script.

Thanks
JC




Reply With Quote
  #3  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Simple If Satement with Date - 11-13-2005 , 12:04 PM



JC <jc (AT) jclewis (DOT) biz> wrote:

Quote:
If
Get(CurrentDate)>12/01/2005
Try replacing this "12/01/05" by "date(mm;dd;yyyy)"

--
http://clk.ch


Reply With Quote
  #4  
Old   
JC
 
Posts: n/a

Default Re: Simple If Satement with Date - 11-13-2005 , 12:27 PM



Bill:

Thanks so much, of course that notifier will be PAY YOUR BILL!!

Thanks
JC


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.