Bug in FILEREPLACEICON and new STRFORMAT commands

0 views
Skip to first unread message

John Bridges

unread,
Apr 8, 2008, 12:52:29 PM4/8/08
to after...@googlegroups.com
New build of AfterGRASP is up for download:

http://www.aftergrasp.com/download/agsetup_20080408.exe


----------------------------------------------------------------------------
Mon, 07 April 2008

Severe bug in FILEICONSET which was failing badly when using an ICON with
more than 1 image. Fixed.


Two new commands, STRFORMATDATETIME and STRFORMATNUMBER. Both use
EXCEL style formatting strings. Neither is complete and
will be ehanced over time. STRFORMATNUMBER is particular still needs
work for some basic functionality. I'm uploading this new build now
to document the new commands, and get the FILEICONSET bug fix uploaded.

STRRESULT = STRFORMATDATETIME(DATEFORMATSTR, DATE, TIME)
STRRESULT = STRFORMATDATETIME(DATEFORMATSTR, DATETIMESTR)

DATEFORMATSTR can be either a fixed name, or a Excel style date format
string:

"General"
"General Date"
"Long Date"
"Long Time"
"Medium Date"
"Medium Time"
"Short Date"
"Short Time"
"Standard"

The style string supports these options, you cannot mix date and time
options in the same format string, results will be unpredictable since
STRFORMATDATETIME uses the GetDateFormat and GetTimeFormat WIN32 API calls.

d Day of month as digits with no leading zero for single-digit days.
dd Day of month as digits with leading zero for single-digit days.
ddd Day of week as a three-letter abbreviation.
dddd Day of week as its full name.
M Month as digits with no leading zero for single-digit months.
MM Month as digits with leading zero for single-digit months.
MMM Month as a three-letter abbreviation.
MMMM Month as its full name.
y Year as last two digits, but with no leading zero for years less than 10.
yy Year as last two digits, but with leading zero for years less than 10.
yyyy Year represented by full four digits.
gg Period/era string.

h Hours with no leading zero for single-digit hours; 12-hour clock.
hh Hours with leading zero for single-digit hours; 12-hour clock.
H Hours with no leading zero for single-digit hours; 24-hour clock.
HH Hours with leading zero for single-digit hours; 24-hour clock.
m Minutes with no leading zero for single-digit minutes.
mm Minutes with leading zero for single-digit minutes.
s Seconds with no leading zero for single-digit seconds.
ss Seconds with leading zero for single-digit seconds.
t One character time-marker string, such as A or P.
tt Multicharacter time-marker string, such as AM or PM.


DATE and TIME are standard AG date and time values,
yyyyMMdd and HHMMSS. Such as 20080403 and 221605.

DATETIMESTR is a Excel format datetime string YYYY-MM-DDTHH:MM:SS.
such as
2008-04-03T00:00:00.000

STRRESULT = STRFORMATNUMBER(NUMBERFORMATSTR, NUMBER)

NUMBERFORMATSTR can be either a fixed name, or an Excel style number
format string. Conditionals are not supported.

"Currency"
"Euro Currency"
"Fixed"
"General"
"General Number"
"Percent"
"Scientific"
"Standard"

The style string supports these options:

0 Digit placeholder. This code pads the value with zeros to fill the format.
# Digit placeholder. This code does not display extra zeros.
? Digit placeholder. This code leaves a space for insignificant
zeros but does not
display them.
. Decimal number.
% Percentage. Multiplies by 100 and adds the % character.
, Thousands separator. A comma followed by a placeholder scales
the number by a thousand.

$ - + / ( ) : space
These characters are displayed in the number. To display any other character,
enclose the character in quotation marks or precede it with a backslash.

\character This code displays the character you specify.

_ This code skips the width of the next character. This code is
commonly used as "_)"
(without the quotation marks) to leave space for a closing
parenthesis in a positive
number format when the negative number format includes parentheses.
This allows the
values to line up at the decimal point.

@ Text placeholder.

"text" This code displays text.

* This code repeats the next character in the format to fill the
column width.
Only one asterisk per section of a format is allowed.


----------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages