Format(expression[, style[, firstdayofweek[, firstweekofyear]]])
The firstdayofweek argument has these settings:
Constant | Value | Description |
---|---|---|
System | 0 | Use the day of the week specified in your system settings for the first day of the week. |
Sunday | 1 | Sunday (default) |
Monday | 2 | Monday |
Tuesday | 3 | Tuesday |
Wednesday | 4 | Wednesday |
Thursday | 5 | Thursday |
Friday | 6 | Friday |
Saturday | 7 | Saturday |
The firstweekofyear argument has these settings:
Constant | Value | Description |
---|---|---|
System | 0 | Use the day of the week specified in your system settings for the first day of the week. |
Jan1 | 1 | Start with week in which January 1 occurs (default). |
FirstFourDays | 2 | Start with the first week that has at least four days in the year. |
FirstFullWeek | 3 | Start with the first full week of the year. |
Remarks
To Format | Do This |
---|---|
Numbers | Use predefined named numeric formats or create user-defined numeric formats. |
Dates and times | Use predefined named date/time formats or create user-defined date/time formats. |
Date and time serial numbers | Use date and time formats or numeric formats. |
Strings | Create your own user-defined string formats. |
If you try to format a number without specifying style, Format provides functionality similar to the Str function, although it is internationally aware. However, positive numbers formatted as strings using Format don’t include a leading space reserved for the sign of the value; those converted using Str retain the leading space.
If you are formatting a non-localized numeric string, you should use a user-defined numeric format to ensure that you get the look you want.
Different Formats for Different Numeric Values (Format Function) | Different Formats for Different String Values (Format Function) | Named Date/Time Formats (Format Function) | Named Numeric Formats (Format Function) | Returning Strings from Functions | Str Function | Type Conversion Functions | User-Defined Date/Time Formats (Format Function) | User-Defined Numeric Formats (Format Function) | User-Defined String Formats (Format Function)