Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    64
    Thanks
    1
    Thanked 1 Time in 1 Post

    Getting date ordinals (Office 97 SR2)

    <img src=/S/bingo.gif border=0 alt=bingo width=15 height=22>
    Is it possible to insert the date in a Word document to show the ordinal - ie, 26th July, 2001 - rather than the normal display of 26 July, 2001?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting date ordinals (Office 97 SR2)

    I think you have to use a combination of Date fields.

    { Date @ "D" *Ordinal } { Date @ "MMMM" }, { Date @ "YYYY" }

    At least that works.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Getting date ordinals (Office 97 SR2)

    <img src=/S/yadda.gif border=0 alt=yadda width=15 height=15>Just being picky:

    <img src=/S/gramps.gif border=0 alt=gramps width=20 height=20>better form (IMO):

    { CREATEDATE @ "d" *Ordinal } { CREATEDATE @ "MMMM" }, { CREATEDATE @ "yyyy" }

    DATE rather than Date - because this is how Word inserts the field - makes it easier to spot for debugging

    CREATEDATE rather than DATE because that is usually what people want (although not always)

    "d" and "yyyy" rather than "D" and "YYYY" even though it doesn't matter because it DOES matter with "MM" vs "mm" For some reason Word has decided to make some of their switches case sensitive. Because of this, I like to use the same case that Word does when formatting the fields.

    For more on formatting date fields see <A target="_blank" HREF=http://www.addbalance.com/word/datefields1.htm>Inserting a Date - and Making it Stick!</A> (addbalance.com/word/datefields1.htm).

    If you want a menu that gives you different kinds of date fields that can be inserted into documents, download the legal toolbars from <A target="_blank" HREF=http://www.addbalance.com/word/download/index.htm>my Word download page</A> (addbalance.com/word/download/index.htm). This is a self-documenting global template.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting date ordinals (Office 97 SR2)

    Charles,

    In this business picky is good and appreciated. Thanks for your careful explanations <img src=/S/yep.gif border=0 alt=yep width=15 height=15>
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Star Lounger
    Join Date
    Apr 2001
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    64
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Getting date ordinals (Office 97 SR2)

    Thanks for the help - I'd been trying this approach, provided by someone else, but the syntax was wrong, so it didn't work.

  6. #6
    Star Lounger
    Join Date
    Apr 2001
    Location
    Winchester, Hampshire, United Kingdom
    Posts
    64
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Getting date ordinals (Office 97 SR2)

    Thanks, Charles. I always appreciate it when someone takes the time to explain things, as well as answer problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •