Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying day of week when date entered (AccessXP)

    Is there a way for a person to type a date in one textbox and have the weekday displayed in another textbox automatically. The date entered may be two years ago.

    Thank you.

    Fay

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Displaying day of week when date entered (AccessXP)

    You can use either the Format function or the WeekdayName and Weekday functions to return day of week for a given date. Examples:

    ? WeekdayName(Weekday("7/04/2003"),False)
    Friday
    ? WeekdayName(Weekday("7/04/2003"),True)
    Fri
    ? Format("7/04/2003","dddd")
    Friday
    ? Format("7/04/2003","ddd")
    Fri

    Note that you can return either full spelled out name or abbreviated name. The Weekday function returns the day of week as number (Sunday is 1 by default) which is required by WeekdayName function. The Format function may be simpler.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •