Need weekday name in ACCESS 2003 with VBA

Posted on 2012-09-21
Last Modified: 2012-09-21
It seems taht the WeekdayName function does not work in ACCESS 2003 vba.  what I need is the WeekdayName and then the date but the below does not work.

dteDate = WeekdayName(Weekday(Date - i)) & " " & Format(Date - i, "mmmm dd, yyyy")

Question by:ssmith94015
    LVL 119

    Assisted Solution

    by:Rey Obrero
    dteDate = Format(Weekday(Date - i),"dddd") & " " & Format(Date - i, "mmmm dd, yyyy")

    if you want abbreviated

    dteDate = Format(Weekday(Date - i),"ddd") & " " & Format(Date - i, "mmmm dd, yyyy")
    LVL 48

    Accepted Solution

    What you need is not dteDate but strDate (as String) and then:

    strDate = Format(Date - i, "dddd mmmm dd, yyyy")


    Author Closing Comment

    I actually wound up using both - the date for a calculation and the string for formatting.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
    Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now