Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date returning value or day of week


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 Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=47615

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert regular Date to Week Ending or Week Beginning Dates Sam H Excel Discussion (Misc queries) 5 April 3rd 23 04:39 PM
I need week number in excell from a date, first week must be mini. jPeich Excel Discussion (Misc queries) 4 January 5th 05 01:21 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 5th 04 01:21 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 1 November 3rd 04 04:35 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 3rd 04 04:26 AM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"