TSC AUTO ID Technology Co., Ltd. 169 Copyright 2013 All Rights Reserved.
FORMAT$( )
Description
Returns the current date and time according to the setting of your printer.
Syntax
FORMAT$(expression[,style$])
Required. Any valid expression.
Optional. A valid named or user-defined format string expression.
Predefined
date/time format
Uses the Long Date format.
Uses the dd-mmm-yy format.
Uses the Short Date format.
Shows the hour, minute, second, and "AM" or "PM" using the h:mm:ss format.
Shows the hour, minute, and "AM" or "PM" using the "hh:mm AM/PM" format.
Shows the hour and minute using the hh:mm format.
User-defined
date/time formats
Display the date as ddddd and display the time as ttttt, in that order.
Display the day as a number without a leading zero (1 - 31).
Display the day as a number with a leading zero (01 - 31).
Display the day as an abbreviation (Sun - Sat).
Display the day as a full name (Sunday - Saturday).
Display a date serial number as a complete date (including day, month, and
year), formatted according to your system's short date format setting. The
default short date format is m/d/yyyy.
Display the date as a complete date (including day, month, and year),
formatted according to the long date setting recognized by your system. The
default long date format is dddd, mmmm dd, yyyy.
Display the day of the week as a number (1 for Sunday through 7 for Saturday).
Display the week of the year as a number (1 - 53).
Display the month as a number without a leading zero (1 - 12). If m
immediately follows h or hh, the minute rather than the month is displayed.
Display the month as a number with a leading zero (01 - 12). If mm
immediately follows h or hh, the minute rather than the month is displayed.
Display the month as an abbreviation (Jan - Dec).
Display the month as a full month name (January - December).
Display the quarter of the year as a number (1 - 4).
Display the day of the year as a number (1 - 366).
Display the year as a 2-digit number (00 - 99).
Display the year as a 4-digit number (100 - 9999).
Display the hour as a number without leading zeros (0 - 23).
Display the hour as a number with leading zeros (00 - 23).
Display the minute as a number without leading zeros (0 - 59).
Display the minute as a number with leading zeros (00 - 59).
Display the second as a number without leading zeros (0 - 59).
Display the second as a number with leading zeros (00 - 59).
Display a time as a complete time (including hour, minute, and second). The
default time format is h:mm:ss AM/PM.
Display an uppercase AM with any hour before noon; display an uppercase PM
with any hour between noon and 11:59 P.M.
Display a lowercase AM with any hour before noon; display a lowercase PM
with any hour between noon and 11:59 P.M.