Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    5

    Post Unanswered: exporting access data to excel formatting

    I am exporting data from access and saving it as an Excel 2000 worksheet. The cells I need to format are the time, date and phone numbers. I need the time and date in one cell instead of two, and I need to format the phone number adding the -. When I try and format the phone number using the format in Excel, the formatting doesn't stick unless I double click in the cell. If I could make these changes without exporting to Excel would be great. Any help with this would be greatly appreciated. Thanks!

  2. #2
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    This should give you and idea of how to go about your task. Not sure how you are doing it now or what format your fields are currently in. In any case you would create a query similar to the one below and export the query to Excel.


    SELECT Format([Time],"Medium Time") & " " & Format([Date],"Medium Date") AS [DateTime], Format([Phone],"@@@-@@@-@@@@") AS PhoneNumber
    FROM TableName;


    Reply back if this does not help.

    Matt

  3. #3
    Join Date
    Oct 2002
    Posts
    5
    Originally posted by Rockey
    This should give you and idea of how to go about your task. Not sure how you are doing it now or what format your fields are currently in. In any case you would create a query similar to the one below and export the query to Excel.


    SELECT Format([Time],"Medium Time") & " " & Format([Date],"Medium Date") AS [DateTime], Format([Phone],"@@@-@@@-@@@@") AS PhoneNumber
    FROM TableName;


    Reply back if this does not help.

    Matt
    I figured out the phone number problem. Thanks.
    I get a report in Access form. It contains 14 columns, only 8 of which I need. The time and date are in two separate columns as DateEntered and TimeEntered. What I need are ex: Date 10/20/2002 and Time 1:35 AM to be in a column titled Date/Time. What type of query would do this. I tried the Union query. The one above did not work.

    Theresa
    Last edited by theresa; 10-21-02 at 05:00.

  4. #4
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    Date/Time: "Date " & Format([Date],"Short Date") & " Time " & Format([Time],"Medium Time")

Posting Permissions

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