Date/Time Data Source Formats
You can run a Date/Time data source to retrieve the current date and time from the Loftware Application Server. The date and time is returned as a STRING value (not a DATE value) in the format specified by the data source. For more information about date/time values in Loftware Enterprise SP, see Time Values in Loftware Enterprise SP.
A Date/Time data source, a Format Date/Time component block, or a dateTime business rule component can return the current time on the Loftware Application Server in any of the following formats.
Tip: If you are associating a Date/Time data source with a variable text field, ensure that the value of Max Chars (controlled by Chars Per Line and # Lines) for the variable text field is great enough to accommodate the length of the resulting data.
Format | Description | Example |
---|---|---|
ddMMyy |
Date, month number, year |
080512 |
d-MMM |
Date and month name |
8-May |
d-MMM-yy |
Date, month name, year |
8-May-12 |
h:mm |
Hour and minutes |
9:56 |
h:mm AM/PM |
Hour and minutes with AM or PM suffix |
9:56 AM |
h:mm:ss |
Hour, minutes, seconds |
9:56:04 |
h:mm:ss AM/PM |
Hour, minutes, seconds with AM or PM suffix |
9:56:04 PM |
hhmm |
Hour and minutes in 24-hour format |
0956 |
hhmmss |
Hour, minutes, seconds in 24-hour format |
095604 |
M/d/yy |
Month number, date, two-digit year |
5/8/12 |
M/d/yy h:mm |
Month number, date, two-digit year, hour, minutes |
5/8/12 9:56 |
MMddyy |
Month number, two-digit date, two-digit year with no separators |
050812 |
MM/dd/yy h:mm |
Month number, two-digit date, two-digit year, hour, minutes |
05/08/12 9:56 |
MM/dd/yyyy |
Month number, two-digit date, year |
05/08/2012 |
MMddyyyy |
Month number, two-digit date, year with no separators |
05082012 |
MMM-yy |
Month name, two-digit year |
May-12 |
WWyy |
Week of the month and two-digit year with no separator |
0415 |
Custom |
Use the date and time symbols to create a custom data format. Tip: In a Date/Time data source, after entering a custom format in the Format field, click another field to refresh the Date/Time Sample. |
|
Placeholder Characters in Custom Date/Time Formats
You can include static text by enclosing it in single quotation marks. You can include symbols such as a colon, slash, or hyphen without quotation marks.
In general, entering a single placeholder character produces a value including the minimum number of characters required. Using repeated placeholder characters typically specifies the minimum number of characters to use and may produce leading zeros in numeric values.
Tip: If you require a placeholder for the Julian day, Julian date, or ordinal date, use D, which produces the day number of the year.
Placeholder | Description | Number of placeholders to use |
---|---|---|
a |
Period of day, such as AM or PM |
1 or 2 |
D |
Day of year |
1 or 3 |
d |
Day of month |
1 or 2 |
E |
Day of week Note: Use one or three characters to produce a three-character day abbreviation, or four characters to produce the full name of the day. |
1, 3, or 4 |
F |
Day of week in month. For example, if referring to the second Thursday in a month, the F placeholder would produce a value of 2. |
1 |
G |
Era, such as A.D. or B.C. |
1 |
H |
Hour of day using 24-hour format (0-23) |
1 or 2 |
h |
Hour of day using 12-hour format (1-12) |
1 or 2 |
K |
Hour of day using 12-hour format (0-11) |
1 or 2 |
k |
Hour of day using 24-hour format (1-24) |
1 or 2 |
M |
Month of year Note: Use one or two characters to produce the month number, three characters to produce a three-character abbreviation, or four characters to produce the full name of the month. |
1, 2, 3, or 4 |
m |
Minute of hour |
1 or 2 |
S |
Millisecond of second |
1 or 3 |
T |
Shift Code for devices with the Server Family and Loftware Model for the Loftware NiceLabel driver. Shift codes are alphanumeric representations of labor shifts within facilities that can be used for traceability and are configured directly on a device console. Note: The T placeholder can only be used on devices with the Server Family and Loftware Model for the Loftware NiceLabel driver. |
1 |
s |
Second of minute |
1 or 2 |
u |
Day of week using numeric format (1-7), such as 1 (representing Monday). |
1 |
W |
Week of month |
1 |
w |
Week of year |
1 or 2 |
X |
ISO 8601 time zone, such as -04, -0400, or -04:00. Note: Use one character to produce a two-digit time (hours only), two characters to produce a four-digit time with no colon, or three characters to produce a four-digit time including a colon. |
1, 2, or 3 |
y |
Year Note: For a two-digit year, use two characters. Otherwise, a four-digit year is displayed. |
1, 2, or 4 |
Z |
RFC 822 time zone, such as -0400. |
1 or 5 |
z |
General time zone, such as Eastern Standard Time or EST. Note: Use one or three characters to produce a three-character abbreviation, or four characters to produce the full name of the time zone. |
1, 3, or 4 |