?問題:
TSC TTP-244Pro條碼打印機(jī)如何添加流動(dòng)時(shí)間(小時(shí)/分鐘/秒鐘),無論打多少?gòu)?,時(shí)間都會(huì)隨著電腦時(shí)間走動(dòng)。
解答:
既然你是想要隨著電腦時(shí)間來走動(dòng),那說明你肯定是通過電腦來連接打印機(jī)進(jìn)行打印的。
TSC TTP-244隨機(jī)附送的電腦編輯軟件是Bartender,該軟件可以非常容易的實(shí)現(xiàn)你的要個(gè)功能要求。
Bartender中有一項(xiàng)數(shù)據(jù)源類型是“時(shí)鐘”,把數(shù)據(jù)源設(shè)置為時(shí)鐘時(shí),“時(shí)鐘”源會(huì)在打印文檔時(shí)讀取操作系統(tǒng)的日期和時(shí)間,Bartender提供了非常豐富的時(shí)鐘格式,并且還支持自定義的時(shí)鐘格式。
注意到問題中還提到一個(gè)“無論打多少?gòu)?,時(shí)間都會(huì)隨著電腦時(shí)間走動(dòng)”的問題,如果是要每一張的時(shí)間都發(fā)生變化的話,那么還需要你設(shè)置個(gè)變量以達(dá)到多次讀取時(shí)間的目的。
自定義日期格式說明符如下:(顯示會(huì)根據(jù)所在區(qū)域有所不同)
日期格式說明符 | 說明 | 例子, January 2, 2004 |
---|
d | The day of the month, from 1 through 31 | 2 |
dd | The day of the month, from 01 through 31 | 02 |
ddd | The abbreviated name of the day of the week | Fri |
dddd | The full name of the day of the week | Friday |
M | The month, from 1 through 12 | 1 |
MM | The month, from 01 through 12 | 01 |
MMM | The abbreviated name of the month | Jan |
MMMM | The full name of the month | January |
y | The year, from 0 to 99 | 4 |
yy | The year, from 00 to 99 | 04 |
yyy | The year, with a minimum of three digits | 2004 |
yyyy | The year, as a four-digit number | 2004 |
yyyyy | The year, as a five-digit number | 02004 |
Y | The last digit of the year, from 0 to 9 | 4 |
YY | The last two digits of the year, from 00 to 99 | 04 |
YYY | The last three digits of the year, from 000 to 999 | 004 |
j | Julian date, from 1 to 366 | 2 |
jjj | Julian date, from 001 to 366 | 002 |
g | Period or era (B.C./A.D.) | A.D. |
@d | Short date pattern | 1/2/2004 |
@D | Long date pattern | Friday, January 02, 2004 |
@f | Full date and time pattern, with short time | Friday, January 02, 2004 12:00 AM |
@F | Full date and time pattern, with long time | Friday, January 02, 2004 12:00:00 AM |
@g | General date and time pattern, with short time | 1/2/2004 12:00 AM |
@G | General date and time pattern, with long time | 1/2/2004 12:00:00 AM |
@m | Month and day pattern | January 02 |
@y | Year and month pattern | January, 2004 |
@r | RFC1123 pattern | Fri, 02 Jan 2004 18:54:03 GMT |
自定義時(shí)間格式說明符如下:(顯示會(huì)根據(jù)所在區(qū)域有所不同)
時(shí)間格式說明符 | 說明 | 例子, 6:54:03 PM |
---|
h | The hour, using a 12-hour clock from 1 to 12 | 6 |
hh | The hour, using a 12-hour clock from 01 to 12 | 06 |
H | The hour, using a 24-hour clock from 0 to 23 | 18 |
HH | The hour, using a 24-hour clock from 00 to 23 | 18 |
m | The minute, from 0 to 59 | 54 |
mm | The minute, from 00 to 59 | 54 |
s | The second, from 0 to 59 | 3 |
ss | The second, from 00 to 59 | 03 |
f | Tenths of a second | |
ff | Hundredths of a second | |
fff | Thousanths of a second; the millisecond | |
ffff | Ten thousanths of a second | |
fffff | Hundred thousanths of a second | |
ffffff | Millionths of a second; the microsecond | |
fffffff | Ten millionths of a second | |
F | Tenths of a second, with no trailing zeros | |
FF | Hundredths of a second, with no trailing zeros | |
FFF | Thousanths of a second, with no trailing zeros; the millisecond | |
FFFF | Ten thousanths of a second, with no trailing zeros | |
FFFFF | Hundred thousanths of a second, with no trailing zeros | |
FFFFFF | Millionths of a second, with no trailing zeros; the microsecond | |
FFFFFFF | Ten millionths of a second, with no trailing zeros | |
t | The first character of the AM/PM designator | P |
tt | The AM/PM designator | PM |
@t | Short time pattern | 6:54 PM |
@T | Long time pattern | 6:54:03 PM |