Source language: Translate to:

Working with Dates

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Working with Dates

Postby Jim Brammer » Thu Feb 07, 2002 4:15 pm

Date Limitation

I need to set a date for one page to not be displayed after certain period. For example, I have a screen to be shown for let's say 3 month, after the 3months ptush es I need this option to be disappear not to be shown... Is this possible? if yes, how can I set this variable?

Thank You


heck o,
here is just a little example, to calculate an unique number, sort in ascending order from 1 to 364, dependend on the day of the year, without plugin.
[m] is the month you are looking for
[t} is the day you are looking for
[n] returns the datenumber

With that formula it should be very easy to calculate a date difference between two dates.
As initialization date, you can add a hardcoded date to the Pub´s authors field in the books setup and access via [PubAuthor].
The second date is the current system date of the end-user.
Calculate the two date-numbers and the difference of them ......

Loop "1" "12" "[m]"
Loop "1" "31" "[t]"

If "[m]" ">" "2"
Math "30.6*([m]+1)-63+[t]" "0" "[n]"
Math "30.6*([m]+13)-428+[t]" "0" "[n]"



Jim Brammer

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 0 guests