CVI时间表示格式
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Absolute Date/Time Specifiers and Modifier
The following list describes the absolute date/time format string specifiers:
∙%H—Hour in 24-hour format, also known as military time. Valid values are 00–23. (小时:24小时制)
∙%I—Hour in 12-hour format. Valid values are 01–12. (12小时制) ∙%M—Minute, as an integer. Valid values are 00–59. (分,int型) ∙%S—Second, as an integer. Valid values are 00–59. (秒,int型)∙%n f—The fractional part of the seconds,(指定“秒”的小数位数)rounded to n digits of precision, where n is an integer between 1
and 20. If you do not specify a value for n, LabWindows/CVI uses
a default precision, which depends on how you use the format string.
If you are formatting a graph or strip chart axis, LabWindows/CVI uses the precision specified for the axis. If you are using
FormatDateTimeString, LabWindows/CVI uses 3 as the default number of digits.
∙%p—AM/PM indicator for a 12-hour clock. The language settings that the operating system uses affect the value used.(采用12小时制
时显示“上下午”)
∙%b—Abbreviated month name.(月份名的缩写)
∙%B—Full month name. (月份名的全写)
∙%m—Month, as an integer. Valid values are 01–12.(用01~12的形式显示月份)
∙%d—Day of the month, as an integer. Valid values depend on the month and year and range from 01 to 31.(一个月中的第几天01~31)∙%j—Day of the year, as an integer. Valid values are 001–366.
∙%a—Abbreviated weekday name. (一年中的第几天001~366)
∙%A—Full weekday name. (星期的全名)
∙%w—Weekday, as an integer. Valid values are 0–6, where Sunday is
0. (int型显示星期:0~6)
∙%U—Week of the year, as an integer, where Sunday is considered the first day of the week. Valid values are 00-53. (一年中的第几个
星期,以星期日为一个星期的第一天)
∙%W—Week of the year, as an integer, where Monday is considered the first day of the week. Valid values are 00-53. (一年中的第几个
星期,以星期一为一个星期的第一天)
∙%Y—Year with century, as an integer. (年份,int型,如:2001)∙%y—Year without century, as an integer. Valid values are 00–99.
(年份的缩写,int型:00~99)
∙%x—Date representation based on the language settings that the operating system uses.(采用和操作系统日期一样的格式显示日期)
∙%X—Time representation based on the language settings that the operating system uses. (采用和操作系统时间一样的格式显示时间)∙%c—Date and time representation based on the language settings that the operating system uses. (采用和操作系统时间和日期一样的
格式显示时间和日期)
∙%z, %Z—Time zone name or time zone abbreviation. (显示时区)∙%%—Percent sign.(%)
用于:FormatDateTimeString (double dateTime, char formatString[], char outputBuffer[],
int outputBufferSize);
LabWindows/CVI also supports the # modifier, which indicates to remove leading zeros. For example, if LabWindows/CVI displays %S as 04 for a particular data value, LabWindows/CVI displays %#S as 4 for that data value.
Relative Date/Time Specifiers and Modifiers
The following list describes the relative date/time format string specifiers:
∙%H—Number of hours since the reference point.
∙%M—Number of minutes since the reference point.
∙%S—Number of seconds since the reference point.
∙%n f—The fractional part of the seconds since the reference point, rounded to n degrees of precision, where n is an integer between
1 and 20. If you do not specify a value for n, LabWindows/CVI uses
the precision specified for the graph or strip chart axis.
∙%X—Time since the reference point, based on the language settings that the operating system uses.
∙%d—Number of days since the reference point.
LabWindows/CVI also supports the following modifiers:
∙#—The # symbol indicates to remove any leading zeros. For example, if LabWindows/CVI displays %S as 04 for a particular data value, LabWindows/CVI displays %#S as 4 for that data value.
∙@—The @ symbol indicates to restrict overflow. For example, if 70 seconds have elapsed since the reference point and you specify %S as the format string, the axis displays 70. However if you
specify %@S as the format string, the axis displays 10. The seconds count starts over at 0 when the number of seconds reaches 60. The @ symbol restricts overflow for hours, minutes, and seconds only.
It modifies the largest applicable time unit in the format string.。