I just want to share two useful NB functions in VBS you can use the in any publication.
1. Weekday from date (returns with the name of days from date):
{NeoBook Function}
Version=5,80
Language=VBScript
Param=[%1]|Number|Date:
Param=[%2]|Variable|Day of the week:
{End}
publication.nbSetVar "[%2]", Weekday("[%1]",0)
2. Formatting numbers
In some cases you need to display the numbers in decimal groups. For example 1 234 567 USD looks better than 1234567 USD. This simple script can do this:
{NeoBook Function}
Version=5,80
Language=VBScript
Param=[%1]|Number|Number to be formatted:
Param=[%2]|Variable|Variable to store result:
{End}
publication.nbSetVar "[%2]", FormatNumber([%1], NoDecimals)
Useful VBS functions
Moderator: Neosoft Support
-
- NeoSoft Team
- Posts: 5628
- Joined: Thu Mar 31, 2005 10:48 pm
- Location: Oregon, USA
- Contact: