Source language: Translate to:

Time

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Time

Postby Neobook » Sat Oct 21, 2006 7:07 am

Hi,

How can I do this :

-1 hour

Math "[Time24]-1" "0" "[Result]"

But it's not working

Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Gaev » Sat Oct 21, 2006 7:33 am

NeoBook:

From the Help file ...
[Time24] The current time in 24-hour format.
[Hour] The current hour.
[Minute] The current minute.
[Second] The current second.
So you can't do Math on a value that has something like 16:59:33

You can do Math on [Hour] ... but you will have to decide what to do when [Hour] is 0 ... something like ,,,
Code: Select all
If [Hour] ">" "0"
   Math "[Hour]-1" "0" "[OneHourBefore]"
Else
   SetVar "[OneHourBefore]" "23"
EndIf
SetVar "[Result]" "[OneHourBefore]:[Minute]:[Second]"
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neobook » Sat Oct 21, 2006 7:50 am

Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests