Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent....I need Access 97 Help Please 1

Status
Not open for further replies.

Esther7101

Programmer
Sep 24, 2003
16
0
0
US
I have built a database with Access 97. I need to export certain fields, not all. I have created an export query and no matter what I do, when I export a date field, I get the date and the time. I have used specific date formating for the export, and it still carries the time with it.

Can someone please tell me the script that I need to use to export the date only? My fields, "birthday" and "anniversary" are populated with date info only.


I am relativley a novice, but want to learn. I am still learning VB syntex and language.

Any and all help is much appreciated. I must be finished with this database this weekend.

Thanks
 
Ester, have you tried something like this. In a new column of your query, put
MyDte:CDbl([Birthday])

This will return the value for the date as a number datatype. You could then try and export that number and reformat it on the other end as a date.

Paul
 
No, unfortunately, I have a required format to deliver, so I can't have them reformat on the other end. Do you have any idea what script could be used to strip the time from the date/time field?
 
The only other thought I have would be this. Create a column in your query.
MyDte:Int([Birthday])

That should return the date in it's proper format and maybe strip out the time, which is stored as a decimal place in Access. But it really seems that the time is being attached after it leaves Access and is loaded into the other application. Where are you exporting to?

Paul
 
To a standard ascci file. Access has a time attached to each date format, it only displays the fomat that you choose, but the date remains and is exported.
 
Dan I don't know why that worked but here's a star for you. There were three or four other threads started on this problem and the Format function was suggested a few times and didn't seem to help but I glad it did this time.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top