Source language: Translate to:

Needing some help

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Needing some help

Postby raymondporteous » Mon Sep 28, 2015 9:40 pm

Hi All
I am new here, forgive my errors in advance.
I am working on a new project after a few years away. I have not really got into NeoBook that much, but now finding myself getting excited. My question is...
I need my a simple date passed script. Let me explain. I have a field in my app that has a expiry date, if the days date passes that expiry date I want an animated image to go from HideObject to showObject, however if the date is updated it must hideobject again. I have tried so many times but can\t work it out. Its doing my head in.

Any help welcomed
Thanks.
raymondporteous
 
Posts: 2
Joined: Mon Sep 28, 2015 11:03 am

Re: Needing some help

Postby Tony Kroos » Mon Sep 28, 2015 10:15 pm

So what is the question? How to compare two dates? If so, then...
0) set expiry date in your pub and convert it to a number [Y] using DateToNum with appropriate format.
Checking routine:
1) get current local date from predefined global variable [DateShort]
2) convert it to a number [X] using DateToNum with appropriate format.
3) Check if [X]>=[Y], then date has expired.
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Needing some help

Postby raymondporteous » Mon Sep 28, 2015 10:59 pm

Tony Kroos wrote:So what is the question? How to compare two dates? If so, then...
0) set expiry date in your pub and convert it to a number [Y] using DateToNum with appropriate format.
Checking routine:
1) get current local date from predefined global variable [DateShort]
2) convert it to a number [X] using DateToNum with appropriate format.
3) Check if [X]>=[Y], then date has expired.


Thanks you so much, I lost so many hours, I will credit you in my pub. Thanks so much
raymondporteous
 
Posts: 2
Joined: Mon Sep 28, 2015 11:03 am

Re: Needing some help

Postby Tony Kroos » Tue Sep 29, 2015 12:51 am

Use forum search next time...
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm


Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 1 guest