dbTalk Databases Forums  

Access 2007: Exporting date field to text without time

comp.databases.ms-access comp.databases.ms-access


Discuss Access 2007: Exporting date field to text without time in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Coll
 
Posts: n/a

Default Access 2007: Exporting date field to text without time - 06-10-2011 , 11:07 AM






I was recently upgraded to Access 2007. I am trying to export a table
to text. My table has 2 date fields and several other fields. The
fields look fine in Access, but when I export, the field includes the
time portion of the date (which is not displayed in Access and is
causing issues for me). I searched online and saw several postings
regarding this, but the primary solution I found (using the format
function in the query e.g. NewDate: format([olddate], "mm/dd/yyyy") -
something along those lines) doesn't work for me. Again, it looks fine
in Access, but then when I export to text, the time shows up. Since
the text file needs to be uploaded into another system, it's causing
lots of issues for me. Any help is greatly appreciated. Oh, and I also
tried exporting to Excel and then converting to a .csv, but the same
issue results - looks fine in Excel, but then the time shows in the
resulting text file.

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Access 2007: Exporting date field to text without time - 06-10-2011 , 12:52 PM






On 10/06/2011 17:07:43, Coll wrote:
Quote:
I was recently upgraded to Access 2007. I am trying to export a table
to text. My table has 2 date fields and several other fields. The
fields look fine in Access, but when I export, the field includes the
time portion of the date (which is not displayed in Access and is
causing issues for me). I searched online and saw several postings
regarding this, but the primary solution I found (using the format
function in the query e.g. NewDate: format([olddate], "mm/dd/yyyy") -
something along those lines) doesn't work for me. Again, it looks fine
in Access, but then when I export to text, the time shows up. Since
the text file needs to be uploaded into another system, it's causing
lots of issues for me. Any help is greatly appreciated. Oh, and I also
tried exporting to Excel and then converting to a .csv, but the same
issue results - looks fine in Excel, but then the time shows in the
resulting text file.

You might try

NewDate = Cstr(Format("#" & OldDate & "#", "mm-dd-yyyy"))

No guarantees.

Phil

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.