Results 1 to 8 of 8
  1. #1
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199

    Changing data format on ad-hoc basis in reporting


    Hello,

    I have date data coming in from an Excel file in number format. For example 1/1/2014 as 41640. I don't want to change this in my tables however I do want to revert back to "Date" format in one of my queries. Does anyone know how I could do this?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe this link will give you some ideas: http://support.microsoft.com/kb/q130514/en-us

  3. #3
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Thanks RuralGuy but I'm more interested in how to format rather than calculate the date. Is there a way to format as a date in my query?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The point was that a DateTime value *is* a number. Are you importing into an existing table that has that field defined as a DateTime field? Access has a tendency to import a lot of fields as either strings or double numbers. What is yours doing?

  5. #5
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    RuralGuy, I *want* to import as "number" (which it is) but in the query/report I want to see that as a "date" e.g. 1/1/2014. Any suggestions?

  6. #6
    JeffChr is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    82
    i'd start with the expression builder maybe something like expr1: format([number-field], "mm/dd/yyyy")

  7. #7
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    JeffCHR,

    BINGO! That worked perfectly.

    Thanks!!

  8. #8
    JeffChr is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    82
    Quote Originally Posted by accessmatt View Post
    JeffCHR,

    BINGO! That worked perfectly.

    Thanks!!
    Your welcome.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Make Table query is changing data format
    By kagoodwin13 in forum Queries
    Replies: 1
    Last Post: 01-14-2014, 12:44 PM
  2. Changing a Field Format
    By lwinford in forum Forms
    Replies: 3
    Last Post: 04-23-2013, 01:18 PM
  3. Replies: 2
    Last Post: 10-09-2012, 12:52 AM
  4. Reporting stacked data from qry in columns
    By SPW_12 in forum Reports
    Replies: 3
    Last Post: 01-17-2012, 04:34 PM
  5. Query changing format
    By John Southern in forum Queries
    Replies: 3
    Last Post: 07-05-2010, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums