Results 1 to 3 of 3
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Date Problem. Month & Year To Show or Record


    in Date field I just want it to show current Month & Year. and same should be added in table.
    how can I write the code. Or how can I do it

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Just curious--- Why?
    If you have a Date datatype, you can store the full Date.

    In queries etc you can use Format or Month or Day or Year built in function(s).

    In a table called Ancestor, I have a field called BirthDate which is date datatype

    Code:
    SELECT Day([birthdate]) AS D, Month([birthdate]) AS M, ancestor.birthdate
    FROM ancestor;
    gives a result

    D
    M birthdate
    31 10 31/10/1922
    22 3 22/03/1944
    1 11 01/11/1922
    9 9 09/09/1999

  3. #3
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    thx I solved the problem
    In Table Design View and In Format I wrote mmmm - yyyy
    this gives me month & year

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

Similar Threads

  1. Sorting by month and day - without year
    By TracyBell in forum Access
    Replies: 3
    Last Post: 11-17-2011, 10:29 AM
  2. Replies: 0
    Last Post: 03-25-2011, 02:37 PM
  3. Month/Year lookup for combo box
    By Buakaw in forum Forms
    Replies: 7
    Last Post: 03-01-2011, 09:49 PM
  4. default month and year
    By beefyalby in forum Forms
    Replies: 3
    Last Post: 12-05-2010, 11:40 PM
  5. by year by month
    By nkuebelbeck in forum Reports
    Replies: 21
    Last Post: 03-24-2010, 01:53 PM

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