Results 1 to 6 of 6
  1. #1
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476

    Dates & Days Fields


    I thought to have heard or seen where a Table containing Field 1-the days of the week & Field 2- the date & as you enter the date the day was automatically inserted in the day field. Is there a way (a formula) whereby when I enter a date in the date field the correspondent day of the week is automatically inserted vs. manually inserting the days along with dates?

  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,521
    The day can be derived from the date, so there's no reason to store it (normalization mistake to store a calculated value). Depending on your needs, you can use Day(), Weekday(), DatePart() and Format() to display day info related to the date.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    How & whre do I put, Day(), Weekday(), DatePart() and Format() in my TABLE? I don't understand.....?

  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,521
    I would not have it in the table. I'd use those functions on forms and reports when I wanted to display the day to the user.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    I don't understand why one wouldn't want a "Day" Field & a "Date" Field in a Table like in a daily tasks Table or in a daily music (Aritst) played Table?

    As a time saver I thought maybe I could create a field called, "day" which would automatically enter te day of the week accoding to the Date enter in the "date" field.

  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,521
    The problem is that you then have to make sure you keep it updated any time you edit the date field. You can do it, but I wouldn't bother. I guess if you're using 2010 the new calculated field might be an option, though I've never used it.
    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-06-2011, 02:20 PM
  2. Mixed dates - show only complete dates?
    By weeblesue in forum Queries
    Replies: 3
    Last Post: 10-27-2010, 02:15 PM
  3. Select Dates between days and two days ago?
    By rstonehouse in forum Queries
    Replies: 4
    Last Post: 08-18-2010, 02:13 AM
  4. Replies: 4
    Last Post: 08-27-2009, 01:21 AM
  5. less than 180 days old
    By techexpressinc in forum Queries
    Replies: 2
    Last Post: 06-04-2009, 04:29 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