Additional value is added to date value or time value after exportingaccess data to text format

R

rajamarzuki

If date value from access is exported to text format, time value
00:00:00 is added after date value.
If time value from access is exported to text format, date value
30/12/1899 is added before time value.
How to prevent this as I don't need additional time or date value in
text format.
Please help.
 
W

Wayne-I-M

Hi

Access always store the full date/time (even if you don't display it). If
you only have the date shown then the time is stored as midnight.

To export this - or just bits of it - you can convert it to text then export
that.

For date only
format([TimeDateField],"dd/mm/yyyy")

Fot time only
format([TimeDateField],""hh:mm AMPM")

If you want to you can export this to a time/date cell and this will
re-convert it back to a "sortable" format.

HTH
 
T

Tom van Stiphout

On Thu, 29 Jan 2009 00:17:11 -0800 (PST), (e-mail address removed)
wrote:

Don't export the table, but export a query based on the table. In it,
you can format date columns any way you want, using the Format
function:
select Format(myDateField, "mm/dd/yyyy")
from myTable

-Tom.
Microsoft Access MVP
 

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