Date error

T

Twb

I have a database that has several felds within it with the Date/Time Format.
the format in the database for all these fields are set to Short date. In
the table the data is shown as 13/08/2009

I've created a letter in word and is using the database as the datasource.

When I merge the document with my data from the database all the Date/Time
fields in the letter show the date as 13/08/09 00:00:00.

i'm using office 2003.

i've viewed the Mail
merge Recipients window in word and it shows all the Date fields entry as
19/07/1965 00:00:00. however in access where the data comes from it is
formated as a date field and the only entry in the field is 19/07/1965.

Please help as I've tried everything even \@ and that did not work in in the
merge code to get it to show correctly
 
J

John W. Vinson

I have a database that has several felds within it with the Date/Time Format.

i've viewed the Mail
merge Recipients window in word and it shows all the Date fields entry as
19/07/1965 00:00:00. however in access where the data comes from it is
formated as a date field and the only entry in the field is 19/07/1965.

Please help as I've tried everything even \@ and that did not work in in the
merge code to get it to show correctly

A Date/Time field is stored as a double float number, a count of days and
fractions of a day since midnight, December 30, 1899. As such all date/time
fields contain a time component - midnight if you enter just a date.

Use a Query for the mailmerge, rather than the table directly; in the Query
you can use the Format() *function* - not the built in field format! - to
explicitly cast the date/time value as a text string. If you want to see the
data as day/month/year use

Format([datefield], "dd/mm/yyyy")

You can use "Short Date" if you want the result to reflect the Regional
date/time settings on the computer running the program; this might vary from
computer to computer.
 

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

Similar Threads


Top