Results 1 to 6 of 6
  1. #1
    penguinwebsoft is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2012
    Posts
    3

    how to extract month and year from date column

    I have a column of date in mm/dd/yyyy format in my table and it's data type is text.


    My objective is to extract only month and year from that table with a specific name.Example:
    ID Name Date
    01 SAM 09/02/2012
    02 DAVID 08/05/2012
    I want the exact query to get the O/P.I am using c#.net in front end and access 2003 in the system.
    Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    If the data type is text, you can use the Mid() function to extract the piece(s) you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    penguinwebsoft is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2012
    Posts
    3
    Can you define the syntax for the above example table?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    There should be examples of syntax in help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    penguinwebsoft is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2012
    Posts
    3
    YES,IT WORKED.THANKS FOR THE HELP

    Do you have knowledge regarding direct parameter transfer from a form textboxes to access report?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Two most common methods are referring to the form in a query criteria and this:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 09-17-2012, 02:15 PM
  2. month year date
    By slimjen in forum Database Design
    Replies: 6
    Last Post: 04-17-2012, 01:02 PM
  3. Separating a date into day, month and year
    By teirrah1995 in forum Reports
    Replies: 3
    Last Post: 07-17-2011, 02:17 PM
  4. Current Month and Year-To-Date
    By DSnipeFunk in forum Access
    Replies: 4
    Last Post: 05-31-2011, 11:38 AM
  5. Replies: 2
    Last Post: 03-26-2011, 02:43 PM

Tags for this Thread

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