Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Posts
    15

    Unanswered: formating date in a query

    Can anybody help me out with this:
    I have got a 3 tables in access which are linked to different text files. Am then creating a query to return different columns from the tables. One of my colunms should return a date. The column appears like below:

    20040322092934
    20040322055236
    20040322013942
    20040322002706
    20040321232629
    20040321225621
    20040321211030
    20040322030429
    20040322133412

    I need the code to return the colum as:

    2004/03/22
    2004/03/22
    2004/03/22
    2004/03/22
    2004/03/21
    2004/03/21
    2004/03/21
    2004/03/22
    2004/03/22

    Thankyou for the help

  2. #2
    Join Date
    Mar 2004
    Posts
    77
    try this: format([YourDate], "yyyy/mm/dd"). put it in the field of the query.

  3. #3
    Join Date
    Jan 2004
    Posts
    15
    Originally posted by chanjw
    try this: format([YourDate], "yyyy/mm/dd"). put it in the field of the query.

    I have tried it as below but it returns an error for all the fields.

    date: Format([Transmission]![Event Start Time],"yyyy/mm/dd")

    Anymore help please.

  4. #4
    Join Date
    Mar 2004
    Posts
    77
    are u querying form one table only? or more than one?

  5. #5
    Join Date
    Jan 2004
    Posts
    15
    Originally posted by chanjw
    are u querying form one table only? or more than one?

    Am queryinb only from one table. It still returns an error message #Error.

    Any more suggestions.

  6. #6
    Join Date
    Mar 2004
    Posts
    77
    when u query it, dun include the table name in the format.
    for example:

    Format([Accurate as of Date],"yyyy/mm/d")

    where [accurate as of date] is my date i queried from my table.

    NOT:

    Format([yourTableName]![Accurate as of Date],"yyyy/mm/d")

Posting Permissions

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