by Derek Pinkerton
28. July 2006 10:35
When Qualtrax inserts dates fields into Word documents the entire date and time is displayed, such as "Monday, July 17, 2006 2:59:44 PM". In some cases you may want to show the short date format instead, such as "7/17/06". Here are some simple instructions on how to format your Qualtrax dates in Word documents.
1) First go to Insert->Field like you normally would to add a Qualtrax field to the document.
2) Select DocProperty and then select the field name that you would like to add such as ##DATE_PUBLISHED##.
3) Now before clicking OK to close this window, click the "Field Codes" button in the lower left corner of the window.
4) You should now see a box titled "Field codes:" that should look like "DOCPROPERTY ##DATE_PUBLISHED##" we will need to add the formatting code to the end of this field. First add " \@ " (without the quotes) which tells word that the rest of the text we add is formatting text. If your formatting text will include any spaces you will need to enclose it with double quotes.
5) Next add one of the following formatting codes to get the desired date format.
MM/DD/YYYY => 02/06/1981
M/D/YYYY => 2/6/1981
"DDD M/D/YYYY" => Fri 2/6/1981
"DDDD MMMM D, YYYY" => Friday February 6, 1981
Here's some more information on each of the formatting characters and what they mean.
Year
Displays a year as two or four digits, depending on how many letters 'y' you use. The letter 'y' can be either uppercase or lowercase.
| Parameter |
Displays |
Example |
y or yy
|
The year in two digit form, with a leading 0 for years 00 to 09
|
06 or 06
|
yyyy
|
the year in four digit form
|
2006
|
Month
Displays a month as one or two digits, as a three-letter abbreviation or in full, depending on how many uppercase letters 'M' you use (lowercase letters 'm' represent minutes).
| Parameter |
Displays |
Example |
M |
The number of the month as a number without a leading 0 for single-digit months
|
7
|
MM
|
the month as a two-digit number with a leading 0 for single-digit months
|
07
|
MMM
|
the month as a three-letter abbreviation
|
Jul
|
MMMM
|
the full name of the month
|
July
|
Day
Displays a day of the month or the day of the week, depending on how many letters 'd' you use. The letter 'd' can be either uppercase or lowercase.
| Parameter |
Displays |
Example |
d
|
The date of the month as a number without a leading 0 for single-digit days
|
27
|
dd
|
the date of the month as a number with a leading 0 for single-digit days
|
27
|
ddd
|
the day of the week as a three-letter abbreviation
|
Thu
|
dddd
|
the full name of the day of the week
|
Thursday
|
Hour
Displays an hour of the day as one or two digits based on either a 12-hour clock or a 24-hour (military) clock, depending on whether you use an uppercase or lowercase 'h'. A lowercase 'h' bases time on the 12-hour clock. An uppercase 'H' bases time on the 24-hour (military) clock. You can also include 'AM/PM' in uppercase or lowercase.
| Parameter |
Displays |
Example |
h or H
|
The hour as a number without a leading 0 for single-digit hours
|
>8 or 8
|
hh or HH
|
the hour as a number with a leading 0 for single-digit hours
|
08 or 08
|
am/pm
|
‘AM’ or ‘PM’ |
AM
|
Note: You can change the AM and PM symbols that Word uses by changing the Time settings in the Regional Settings dialog box in the Windows Control Panel. For example, you could use this to force the 'am/pm' parameter to display as 'a.m./p.m.'.
Minute
Displays the minute as one or two digits, depending on how many letters 'm' you use (uppercase letters 'M' represent months).
| Parameter |
Displays |
Example |
m
|
The minute as a number without a leading 0 for single-digit minutes
|
43
|
mm
|
the minute as a number with a leading 0 for single-digit minutes
|
43
|
Second
Displays the second as one or two digits, depending on how many letters 's' you use. The letter 's' can be either uppercase or lowercase.
| Parameter |
Displays |
Example |
s
|
The second as a number without a leading 0 for single-digit seconds
|
10
|
ss
|
the second as a number with a leading 0 for single-digit seconds
|
10 |
3636415c-9cfd-4ae7-845b-32ce6634ef4a|0|.0
Tags: word, qualtrax