Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
ctt ctt is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
ctt ctt is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
table of contents field codes are on print out geoboss Microsoft Word Help 11 September 19th 07 04:34 PM
Inserting pages in document being indexed Jeannie Microsoft Word Help 8 March 29th 07 01:02 AM
modifying all TC field codes to decrease their outline level Chip Orange Tables 2 January 30th 06 02:56 PM
Secondary page numbering using field codes Jerry Microsoft Word Help 2 January 14th 06 10:13 AM
Field Codes Meryl Microsoft Word Help 1 February 21st 05 07:07 AM


All times are GMT +1. The time now is 10:37 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"