PDA

View Full Version : Solved: Date Format



Levski
05-03-2005, 05:43 AM
Is there a standard function for having d MMMM yyyy display with the appropriate st/nd/rd/th following the day, or should I just construct a string using a case statement?

Thanks.

Jacob Hilderbrand
05-03-2005, 07:22 AM
I don't believe there is anything builtin to Word to put the day ordinal in automatically. Take a look at thie Kb Entry (http://www.vbaexpress.com/kb/getarticle.php?kb_id=175). It is for Excel, but it will show you how to set up the Select Case construct.

MOS MASTER
05-03-2005, 10:41 AM
Is there a standard function for having d MMMM yyyy display with the appropriate st/nd/rd/th following the day, or should I just construct a string using a case statement?

Thanks.
Hi Lev, :D

I'm sorry but I don't really understand you're question!

But if you are looking for a function that takes a date and Formats it to the desired "Date Format" then you should look at the Format function of VBA

Perhaps if you gave more information then perhaps there would be other date function that would be handy...but like I said I don't get your question for now.

Enjoy! :whistle:

TonyJollans
05-03-2005, 04:08 PM
There's nothing I know in VBA but in a Word Field you can use the "\* Ordinal" switch. That may or may not help depending on what you are trying to do.

MOS MASTER
05-05-2005, 06:29 AM
Hi Lev, :D

See you've got this beat now.
Can you show your sollution so I can see what you where after? :thumb

Levski
05-08-2005, 04:17 AM
I used TonyJollans \* Ordinal switch advice :beerchug:

MOS MASTER
05-08-2005, 06:08 AM
I used TonyJollans \* Ordinal switch advice :beerchug:
Nice to see you've got it working now.

So you are using fieldcodes like: {DATE \@ "d" \* Ordinal}?

See Yah! :whistle: