Date Switches

J

JamesNicholls

Hi

I've setup a mailmerge where Excel is the datasource. The data that's in Excel is passed though via a mainframe. One of the fields (DOB) isn't formatted and is formatted as YYYYMMDD. I'm aware that you can apply switches via the mergefield in word (Alt+F9) but I can't seem to get the data to change into date format (i.e. 11 November 2003). Can you let me know if this can be done or alternaltively point me in the direction of a site that will tell me.

Thanks in advanced!
 
A

Andrew Pearen

I have the same issue. My data is comming from a SQL
database and I am unable to alter the date format I have
followed what I thought were the parameters for doing this.
Using the field codes I changed "{
MERGEDFIELD «EMP_ADJ_HIRE_DATE» }" to "{
MERGEDFIELD «EMP_ADJ_HIRE_DATE» \@ "dd-MMM-yyy" }"
Can anyone provide some direction or thought on why this
does not work :)
-----Original Message-----
Hi

I've setup a mailmerge where Excel is the datasource. The
data that's in Excel is passed though via a mainframe. One
of the fields (DOB) isn't formatted and is formatted as
YYYYMMDD. I'm aware that you can apply switches via the
mergefield in word (Alt+F9) but I can't seem to get the
data to change into date format (i.e. 11 November 2003).
Can you let me know if this can be done or alternaltively
point me in the direction of a site that will tell me.
 
P

Peter Jamieson

There's probably a simpler way, but if not, you may need to split the date
up using { = } fields, e.g.

{ SET dt { MERGEFIELD mydate } }
{ SET y { =int({ dt } / 10000) } }
{ SET md { = { dt } - ({ y}*10000) } }
{ SET m { =int({ md } / 100) } }
{ SET d { = { md } - ({ m}*100) } }

Then e.g.

{ QUOTE "{ y }-{ m }-{ d }" \@"DD MMMM YYYY" }

--
Peter Jamieson
MS Word MVP

JamesNicholls said:
Hi

I've setup a mailmerge where Excel is the datasource. The data that's in
Excel is passed though via a mainframe. One of the fields (DOB) isn't
formatted and is formatted as YYYYMMDD. I'm aware that you can apply
switches via the mergefield in word (Alt+F9) but I can't seem to get the
data to change into date format (i.e. 11 November 2003). Can you let me know
if this can be done or alternaltively point me in the direction of a site
that will tell me.
 
G

gyom

I face the same problem, but don't know what you refer to . Can you explain where I am supposed to had these lines in order to get that result. I need this document out by morning, and I have been pulling my hair for 2 days on that one.
Thanks
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Z3lvbQ==?=,
I face the same problem, but don't know what you refer to . Can you explain
where I am supposed to had these lines in order to get that result. I need
this document out by morning, and I have been pulling my hair for 2 days on
that one.Which version of Word? What's your data source? What problem, exactly, do you
have (the others in this thread had slight variations).

If you're in a hurry, you may find the information on my website and Graham
Mayor's helpful (www.gmayor.dsl.pipex.com)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top