+ Reply to Thread
Results 1 to 5 of 5

Date returning value or day of week

  1. #1
    Callan
    Guest

    Date returning value or day of week

    Please can someone give me the syntax to return a value (0,1,2,3 etc) or "day
    of the week" when evaluating a specific date.
    Many Thanks
    --
    Callan

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Callan,

    The easiest way is create a custom cell format.

    1) Select the Cells or Cell you want to display the day of the week

    2) On the Main Toolbar click Format

    3) Click Cells...

    4) Select the Number Tab

    5) Click on Custom in the Category list

    6) In the Type box (on the right) clear the contents

    7) Type in ddd if you want to return the short form of the day (Sun, Mon, etc.)

    8) Type in dddd if you want the full name of the day

    9) Click OK

    You can then reuse this format at anytime, anywhere in your workbook.


    Sincerely,
    Leith Ross

  3. #3
    Patrick Molloy
    Guest

    RE: Date returning value or day of week

    use the WEEKDAY function.

    "Callan" wrote:

    > Please can someone give me the syntax to return a value (0,1,2,3 etc) or "day
    > of the week" when evaluating a specific date.
    > Many Thanks
    > --
    > Callan


  4. #4
    Bob Phillips
    Guest

    Re: Date returning value or day of week

    Note that weekday returns 1-7 not 0-6.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Patrick Molloy" <[email protected]> wrote in message
    news:[email protected]...
    > use the WEEKDAY function.
    >
    > "Callan" wrote:
    >
    > > Please can someone give me the syntax to return a value (0,1,2,3 etc) or

    "day
    > > of the week" when evaluating a specific date.
    > > Many Thanks
    > > --
    > > Callan




  5. #5
    Andy Pope
    Guest

    Re: Date returning value or day of week

    You can use the 2nd argument of the Weekday function

    WEEKDAY(serial_number,return_type)

    Return_type
    1 or omitted Numbers 1 (Sunday) through 7 (Saturday)
    2 Numbers 1 (Monday) through 7 (Sunday)
    3 Numbers 0 (Monday) through 6 (Sunday)

    Cheers
    Andy

    Bob Phillips wrote:
    > Note that weekday returns 1-7 not 0-6.
    >


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

+ 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.6.0 RC 1