+ Reply to Thread
Results 1 to 5 of 5

Thread: weekdayName function

  1. #1
    Forum Contributor
    Join Date
    01-17-2008
    Posts
    112

    weekdayName function

    Hi,

    I have a column field DateTime in (dd/mm/yy hh:mm) format

    I trying to figure out how to extract out the rows based on current week.

    Now()
    WeekdayName()
    .... ?

    How to link them together to get you current week ?!?!?


    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,163

    Re: weekdayName function

    This maybe will give you TRUE/FALSE

    =WEEKDAY(A2)=WEEKDAY(NOW())
    "Relax. What is mind? No matter. What is matter? Never mind!"


    MOTD: Until I taste a lion pig is a King of animals to me.

  3. #3
    Forum Contributor
    Join Date
    01-17-2008
    Posts
    112

    Re: weekdayName function

    SELECT Table1.DateTime, Weekday([DateTime])=Weekday(Now()) AS Expr1
    FROM Table1;

    Result:
    DateTime Expr1
    18/1/2011 0
    19/1/2011 0
    18/2/2011 -1
    19/2/2011 0
    20/2/2011 0
    21/2/2011 0


    current week is 8 = 13/02/2011 to 19/02/2011

    but 19/02/2011 i got 0 ?

  4. #4
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2003, Excel 2007 (Portable)
    Posts
    388

    Re: weekdayName function

    Try this

    SELECT datetime.Date, Weekday([date]) AS Expr1
    FROM [datetime]
    WHERE (((Weekday([date]))=Weekday(Now())));

  5. #5
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: weekdayName function


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0