Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Time stamp in field codes
HOw can I have the field code display AM or PM time stamps with just an A or
P? I know I can change the regional settings on my pc but is there any statement I can run in the field code that will change AM to A and PM to P? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Time stamp in field codes
You can do it with a conditional field eg
{ IF{ TIME \@ "h"} 12 "{ TIME \@ "hh:mm a" \*upper}""{ TIME \@ "hh:mm p" \*upper }" } If you want lower case, remove the \*upper switches. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ctt wrote: HOw can I have the field code display AM or PM time stamps with just an A or P? I know I can change the regional settings on my pc but is there any statement I can run in the field code that will change AM to A and PM to P? |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Time stamp in field codes
Thank you for this and I have one more question. Exactly how would I word
the string? Here is my original string and I've played with it but it errors out. {DOCPROPERTY "DictatedDateTime" \@ " hh mm a/p " \ * MERGEFORMAT} Where in this string would I embed the if then statement? "Graham Mayor" wrote: You can do it with a conditional field eg { IF{ TIME \@ "h"} 12 "{ TIME \@ "hh:mm a" \*upper}""{ TIME \@ "hh:mm p" \*upper }" } If you want lower case, remove the \*upper switches. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ctt wrote: HOw can I have the field code display AM or PM time stamps with just an A or P? I know I can change the regional settings on my pc but is there any statement I can run in the field code that will change AM to A and PM to P? |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Time stamp in field codes
Change each instance of TIME to DOCPROPERTY "DictatedDateTime" ie
{ IF{DOCPROPERTY "DictatedDateTime" \@ "h"} 12 "{ DOCPROPERTY "DictatedDateTime" \@ "hh:mm a" \*upper}""{ DOCPROPERTY "DictatedDateTime" \@ "hh:mm p" \*upper }" Note that each set of brackets is inserted with CTRL+F9 The line breaks in the above string are inserted by the newsgroupo editor and should not be present (apart from when the string wraps to the margins). Select the completed field and press F9 to update. If necessary toggle the display with ALT+F9 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ctt wrote: Thank you for this and I have one more question. Exactly how would I word the string? Here is my original string and I've played with it but it errors out. {DOCPROPERTY "DictatedDateTime" \@ " hh mm a/p " \ * MERGEFORMAT} Where in this string would I embed the if then statement? "Graham Mayor" wrote: You can do it with a conditional field eg { IF{ TIME \@ "h"} 12 "{ TIME \@ "hh:mm a" \*upper}""{ TIME \@ "hh:mm p" \*upper }" } If you want lower case, remove the \*upper switches. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ctt wrote: HOw can I have the field code display AM or PM time stamps with just an A or P? I know I can change the regional settings on my pc but is there any statement I can run in the field code that will change AM to A and PM to P? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
table of contents field codes are on print out | Microsoft Word Help | |||
Inserting pages in document being indexed | Microsoft Word Help | |||
modifying all TC field codes to decrease their outline level | Tables | |||
Secondary page numbering using field codes | Microsoft Word Help | |||
Field Codes | Microsoft Word Help |