Link to home
Start Free TrialLog in
Avatar of robinski
robinski

asked on

Time format Access and mail merge

Greetings To All
===========

I keep a database of club details which includes meeting time as a "Short Time" field and appears as 18:30. I also use the 24hr option.

Amongst other things I use the data for mailmerge in Word2K and the time is then displayed as 18:30:00

What can I do to remove the seconds?

Many thanks,

robinski
Avatar of nico5038
nico5038
Flag of Netherlands image

Did you try to change the timeformat in the regional setting in the configuration window?
Avatar of brewdog
brewdog

Are you using the table itself as the record source for the mail merge? What about basing a query off the table and putting this for your time field:

CStr(YourField)

I'm not a machine with Access right now, so I can't guarantee it would work, but . . . it would convert it to text rather than letting Word read the stored time value.

Hope this helps . . .

brewdog
You need to fix this from the Word side, not the Access side.

1. In your mail merge source document, go to the time fields that are not displaying properly. The will look something like <<meetingtime>>

2. Right click on the field and select toggle field codes

3. If you haven't done anything to the field, it will probably have a part that says \* MERGEFORMAT

Replace this with \@h:mm
If  you want am and pm to show, replace it with
\@h:mm am/pm

If you want the leading 0 to show in the time with AM or PM, replace it with
\@hh:mm AM/PM

Hope this helps.

Richard
repstein,

Just out of curiosity:
Is the \* MERGEFORMAT referring/using  the regional settings ?
nico5038:

\* MERGEFORMAT is a switch that maintains formatting directly applied to a field in Word. As best as I can tell, it sometimes is needed, and sometimes is not. If formatting is lost in the mailmerge document, then it needs to be added. It's automatically applied by Word when a field is inserted and Preserve formatting during updates has been checked in the Field dialog box. If you want to use a picture switch (such as \@ for times), this needs to come before the \* MERGEFORMAT switch).

It doesn't have anything to do with regional settings.

Richard
Avatar of robinski

ASKER

restein

Many thanks. Your technique certainly removed the seconds but I use a 24 hour clock. Is this possible?

robinski
ASKER CERTIFIED SOLUTION
Avatar of repstein
repstein

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very very much.

robinski