Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically updating date

Status
Not open for further replies.

NIA2

Technical User
Aug 30, 2006
137
AU
Hi everyone,

I need to put a field in my Word document that updates the date dynamically. The only problem is that I need it to take the following format:

dated [XX] day of [MM], [YYYY].

So the field would have to be broken up somehow to allow me to put in the extra words, ie. 'dated' and 'day of'.

Is there a way to do this?

Thanks for any help offered
 

Code:
Debug.Print "dated " & Day(Date) & " day of " & Format(Date, "MM, YYYY")

[blue]dated 25 day of 03, 2008[/blue]

Debug.Print "dated " & Day(Date) & " day of " & Format(Date, "MMM, YYYY")

[blue]dated 25 day of Mar, 2008[/blue]

Debug.Print "dated " & Day(Date) & " day of " & Format(Date, "MMMM, YYYY")

[blue]dated 25 day of March, 2008[/blue]
Is that what you are looking for?

Have fun.

---- Andy
 
Type Dated, then hit spacebar. Click Insert - Field. Under Categories, select Date And Time. On right, select Date. At bottom, select Options. At bottom, you'll see the function Date. Next to it, with a space, type \@ "d". Then click Ok, Ok. So you'll see Dated 25 (or whatever day it is). Then type Day of . Then Insert - Field. Same as above but with \@ "MM, yyyy" (capital M). Note you can save these formats.
 
Thanks for both replies - that's exactly what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top