FormatString Property
Syntax
CWAxis3D.FormatString
Data Type
Purpose
Specifies the format string for formatting the labels on this axis.
Remarks
The formatting string is similar to the string for the Format function in Visual Basic. The following formatting characters are available:
. (decimal point) | Specifies the beginning of the number within the label. Use # and 0 to the right of the decimal point to specify the precision. A decimal point is assumed to be the first character in the format string if you do not include a decimal point in the format string. |
0 | Specifies the precision to the right of the decimal point. For example ".#0" always produces two digits to the right of the decimal point even when given an exact number such as 1.0. |
# | Specifies the precision to the right of the decimal point. For example ".##" produces up to two digits to the right of the decimal point. Thus 1.0 produces 1 while 1.025 produces 1.03. |
e or E | Specifies exponential notation. "E" specifies the capital letter. "e" specifies the lower case letter. |
*nn | Scales labels. For example ".*10" prints the value 1.0 as 10. |
+nn or -nn | Offsets labels. For example ".+20" prints the value 1.0 as 21. |
k | Specifies symbolic notation. For the format string ".k" 1.0 prints as 1 and 1000 prints as 1k and .001 prints as 1m. |
"text" | Specifies the addition of text to the label. For example '."V"' adds a V to the right of every label. Thus 1.0 becomes 1 V. |
$ or % | Specifies to print these special characters. |
: (colon) | Time separator. The time separator uses hours:minutes:seconds when time values are formatted. |
/ | Date separator. The date separator uses day/month/year when date values are formatted. |
d | Displays the day as a number without a leading zero. For example: 1-3 |
,dd | Displays the day as a number with a leading zero. For example: 01-31 |
ddd | Displays the day as an abbreviation. For example: Sun - Sat. |
dddd | Displays the day as a full name. For example: Sunday - Saturday |
w | Displays the day of the week as a number. For example: 1 for Sunday through 7 for Saturday |
ww | Displays the week of the year as a number. For example: 1-53 |
m | Displays the month as a number without a leading zero. For example: 1 - 12 |
mm | Displays the month as a number with a leading zero. For example: 01 - 12 |
mmm | Displays the month as an abbreviation. For example: Jan - Dec |
mmmm | Displays the month as a full month name January - December |
q | Displays the quarter of the year as a number. For example: 1 - 4 |
y | Displays the day of the year as a number. For example: 1 - 366 |
yy | Displays the year as a 2-digit number. For example: 00 - 99 |
yyyy | Displays the year as a 4-digit number. For example: 1000 - 9999 |
h | Displays the hour as a number without leading zeros. For example: 0 - 23 |
hh | Displays the hour as a number with leading zeros. For example: 00 - 23 |
n | Displays the minute as a number without leading zeros. For example: 0 - 59. |
nn | Displays the minute as a number with leading zeros. For example: 00 - 59 |
s | Displays the second as a number without leading zeros. For example: 0 - 59 |
ss | Displays the second as a number with leading zeros. For example: 00 - 59 |
AM/PM | Uses the 12-hour clock and displays "AM" with any hour before noon. Displays "PM" with any hour between noon and 11:59 PM |
am/pm | Uses the 12-hour clock and displays "am" with any hour before noon. Displays "pm" with any hour between noon and 11:59 pm |
A/P | Uses the 12-hour clock and displays "A" with any hour before noon. Displays "P" with any hour between noon and 11:59 PM. |
a/p | Uses the 12-hour clock and displays "a" with any hour before noon. Displays "p" with any hour between noon and 11:59 pm. |
If you select a format string that includes date or time formatting, the property pages will display all values in a generic date and time format for editing.
Additionally, any property can be set programmatically with a string representing a date and/or time. Thus, a statement such as: CWSlide1.Value = "01/08/1923 9:12:33.14 pm" is a valid value. This statement can be abbreviated to represent just the time or just the date. For example, CWSlide1.Value = "1/1/73" and CWSlide1.Value = "9:15 pm" are valid as well.
With ActiveX controls, the date is implemented as a floating-point value, measuring days from midnight, 30 December 1899. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25. To interpret the time portion, take the absolute value of the fractional part of the number. Thus, 1 second equals 1 / 24 hours / 60 minutes / 60 seconds, which is 1/86400 or approximately 1.157407e-5.
Example
'Up to two digits to the right of the decimal on
'the x-axis of the graph to 2 digits of precision
CWGraph3D1.Axes.Item(1).FormatString = ".##"