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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97 Date/Time Issue

Status
Not open for further replies.

Esther7101

Programmer
Sep 24, 2003
16
US
I find it impossible to export a date without having a time attached. How do I wipe out the date on export? This is a function that I need for exporting repetetively, for I need to export certian data entry time periods on an ongoing basis.

Thanks
 
This works in Access 2000 not sure if it works in 97.

First make sure that the table field that your date is in is formated as either long time, medium time, or short time.

When you window pops up asking what name and file type you want to export as their is a checkbox next to the save button with the label "Save as formated", check this box before pressing save and your time will export as it is in your table.
 
I don't have a time field, and I don't want any time to export. I need to export in text. The date/time fild automatically stores both the date and the time, even on the short format. Even though we can't see the time, it saves the midnight since it has no data. How can I jsut get rid of the time???
 
I appoligize, I read your post and then transposed what you had typed.

If you base your export on a query:

Remove the field for the date. In a blank column in the field row(the very top one) use this expression:

Expr1: Format([tablename]![fieldname],"mm-dd-yyyy")

replace the tablename with the name of the table you are exporting from and the fieldname with the name of your date field. You can also rename Expr1 with an alias so that it uses a name that refers to the date, but it cannot be the same name as any field in your table.

When specifying criteria for this field remember that it is now a text field and change criteria as needed. For instance Is not Null will not work use Not Like "",
and to specify a date enter it "11-25-2003". Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top