Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    june, quick question, for the post where you put:



    MonYearReq: Month([Date Column]) & Year([Date Column])

    this will spit out for example: 012012

    how do i modify this to display the day also? and in this format for example 01/18/2012


    thanks so much june, you're the best

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    MonYearReq: Month([Date Column]) & Year([Date Column]) will take 01/23/2012 and spit out 12012.

    Why do you need to day part? If you already have a full date, why break it up and put back together?

    Format(Date()),"mmddyyyy") will take 01/23/2012 and spit out 01232012.

    Day(Date()) will take 01/23/2012 and spit out 23.

    Here is a resource to learn what functions are available for Access and VBA http://www.techonthenet.com/access/functions/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    i see, the reason why i asked was because i wanted to format my [date column] to date only, since it contained the date AND the time.

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    A date/time datatype field always has a data and time components. You might not see it but it is there. If you don't provide a part Access will make assumption. For time I think is 12:00:00 AM and date something like 1/1/1900. The Format property doesn't alter that. Format function will present altered value as a string (although, again, doesn't change the data actually saved in table).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-15-2011, 01:43 PM
  2. Track capacity changes month by month
    By Nils in forum Database Design
    Replies: 1
    Last Post: 02-18-2011, 03:03 PM
  3. Replies: 5
    Last Post: 11-15-2010, 06:12 PM
  4. How do you refer to primary key on split form?
    By techneophyte in forum Forms
    Replies: 3
    Last Post: 08-13-2010, 08:11 AM
  5. Refer to main form
    By terryvanduzee in forum Forms
    Replies: 3
    Last Post: 10-23-2009, 07:02 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