Results 1 to 5 of 5
  1. #1
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91

    Make table query

    Hi, hope someone can help.



    I am creating a make query table of three columns, [ID], [Name] and [date]. To get to this stage there has been several queries so the date column is in text format. I now need to make a table but revert the [date] field back to a short date format and I'm not sure how to do this.

    Any ideas would be greatfully appreciated.

    Thank you.

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    I would try to stay away from the access reserved word like "date". Here is a list of reserved word used in access.
    http://support.microsoft.com/kb/321266/en-us

    To answer your question, use "CDate" on your date. It will convert the date string back to actual date type.
    SELECT [ID], [Name], CDate([date]) FROM YourTable .....

    OR ("#DateString# should work as well. I have not tested this).
    SELECT [ID], [Name], #[date]# FROM YourTable .....

  3. #3
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you CDate worked well all I have to do is get it to keep the field name as it has brought it across as Expr1002.

  4. #4
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    In case you did not know. You can changed that "Expr1002" to anything you want.

    In "design view", it should be something like "Expr1002: CDate....". You can changed to something like "NewDate: CDate....". Then the "NewDate" will be your new column name.

  5. #5
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thanks for that, I've done that before but didn't think to revert back to the design view again

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

Similar Threads

  1. Make Table Query
    By Lpitt56 in forum Access
    Replies: 3
    Last Post: 08-18-2011, 12:27 PM
  2. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  3. Make table query
    By Zahed in forum Queries
    Replies: 1
    Last Post: 11-06-2009, 05:44 AM
  4. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  5. Make a table query
    By Fiona in forum Access
    Replies: 4
    Last Post: 06-25-2009, 11:24 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