Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2004
    Location
    Tulsa, OK
    Posts
    5

    Unanswered: Removing Time from Text Export in Access 2000

    I'm exporting a table to a comma delimited text file which includes a date. I used the Export Specifications wizard to set up the format, but the date field in the text file includes a time of " 0:00:00", which I don't want, and wizard doesn't seem to offer any way of excluding this portion of the date.

    The time doesn't display in the date field prior to export, and the properties are set to "yyyymmdd".

    Is there a way of saving me from having to edit the text file every time I create it?

    I would appreciate any help anyone can give.

  2. #2
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    Check the data type of the field in the table. If possible set the mask property to show only the date like setting the mask to "mm/dd/yyyy" should do the trick.

  3. #3
    Join Date
    Jun 2004
    Location
    Tulsa, OK
    Posts
    5
    I tried using the "yyyymmdd" in the input mask field, but that doesn't seem to help. Thanks anyway.

  4. #4
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    are you exporting from a table or a query?

    what is the data type of the field in the table?

  5. #5
    Join Date
    Jun 2004
    Location
    Tulsa, OK
    Posts
    5
    I'm actually using a query to export from two tables (the date field is only in one of them), and the date field in both the table and the query have "yyyymmdd" specified. I tried using "yyyymmdd" for an input mask in both as well, but it didn't help.

    The data type is set to "Date/Time". I haven't tried using a text string as this may mess up something elsewhere.
    Last edited by Andyok50; 06-25-04 at 11:00.

  6. #6
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    in the query use format([datefield],"yyyymmdd") rather than the datefield itself

  7. #7
    Join Date
    Jun 2004
    Location
    Tulsa, OK
    Posts
    5
    I get "Undefined function 'Format' in expression" using:

    Expr1: Format([PRICES].[DATE],"yyyymmdd")

    Am I missing some sort of add-in? The query builder Wizard includes the 'Format' expression, so I'm not sure why this wont run.

  8. #8
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    check your references

  9. #9
    Join Date
    Jun 2004
    Location
    Tulsa, OK
    Posts
    5

    Smile Yeah - Got it working!

    I finally figured out that there was a problem with my Access install - a missing or corrupted dll probably. A repair install fixed the 'Undefined function' issue.

    However, I still needed to create an Export specification after that to prevent the "date" field from having quotes like a text field. See the MS Access Help file for more info on creating Export specifications.

    Andyok50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •