Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default DateDiff("w") -- problem

I am trying to count weekdays, using the "w" argument unsuccessfully. I get
the same value for "w" (weekday) as I do for "ww" (week). What am I doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default DateDiff("w") -- problem

I'm not aware of the "w" or "ww" arguments. Where did you find them
documented?

"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument unsuccessfully. I

get
the same value for "w" (weekday) as I do for "ww" (week). What am I doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default DateDiff("w") -- problem

Found in the Help documentation for Excel ("DateDiff Function").


"Niek Otten" wrote in message
...
I'm not aware of the "w" or "ww" arguments. Where did you find them
documented?

"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument unsuccessfully. I

get
the same value for "w" (weekday) as I do for "ww" (week). What am I

doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default DateDiff("w") -- problem

Hi Niek!

zSplash is talking about the vba DATEDIFF not the mysterious Workbook
function DATEDIF

Datediff is documented in Help for all versions since at least Excel
97.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Niek Otten" wrote in message
...
I'm not aware of the "w" or "ww" arguments. Where did you find them
documented?

"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I
get
the same value for "w" (weekday) as I do for "ww" (week). What am

I doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default DateDiff("w") -- problem

For the mysterious Worksheet function look here
http://office.microsoft.com/assistan...fctDATEDIF.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Norman Harker" wrote in message ...
Hi Niek!

zSplash is talking about the vba DATEDIFF not the mysterious Workbook
function DATEDIF

Datediff is documented in Help for all versions since at least Excel
97.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Niek Otten" wrote in message
...
I'm not aware of the "w" or "ww" arguments. Where did you find them
documented?

"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I
get
the same value for "w" (weekday) as I do for "ww" (week). What am

I doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default DateDiff("w") -- problem

Hi zSplash!

I think that you are misunderstanding what DATEDIFF means by "w" and
"ww" arguments.

Extract from Help:

When interval is Weekday ("w"), DateDiff returns the number of weeks
between the two dates. If date1 falls on a Monday, DateDiff counts the
number of Mondays until date2. It counts date2 but not date1. If
interval is Week ("ww"), however, the DateDiff function returns the
number of calendar weeks between the two dates.

Both are counting weeks which is why in your case you are getting the
same answer.

To count weekdays use the Analysis ToolPak NETWORKDAYS function.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I get
the same value for "w" (weekday) as I do for "ww" (week). What am I

doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default DateDiff("w") -- problem

Absolutely right, Norman. I always assumed they were just the VBA and the SS
version of one and the same thing, but that turns out to be completely
wrong.

Thanks!

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Norman Harker" wrote in message
...
Hi Niek!

zSplash is talking about the vba DATEDIFF not the mysterious Workbook
function DATEDIF

Datediff is documented in Help for all versions since at least Excel
97.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Niek Otten" wrote in message
...
I'm not aware of the "w" or "ww" arguments. Where did you find them
documented?

"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I
get
the same value for "w" (weekday) as I do for "ww" (week). What am

I doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default DateDiff("w") -- problem

Thanks, Norman, for the help. I guess I just didn't read the expanded help,
and assumed. Sorry.

So, how do I access (or install, if necessary) the "Analysis Toolpack"
functions? This is new to me. (I don't see it in my References...)

st.

"Norman Harker" wrote in message
...
Hi zSplash!

I think that you are misunderstanding what DATEDIFF means by "w" and
"ww" arguments.

Extract from Help:

When interval is Weekday ("w"), DateDiff returns the number of weeks
between the two dates. If date1 falls on a Monday, DateDiff counts the
number of Mondays until date2. It counts date2 but not date1. If
interval is Week ("ww"), however, the DateDiff function returns the
number of calendar weeks between the two dates.

Both are counting weeks which is why in your case you are getting the
same answer.

To count weekdays use the Analysis ToolPak NETWORKDAYS function.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I get
the same value for "w" (weekday) as I do for "ww" (week). What am I

doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default DateDiff("w") -- problem

Hi zSplash!

You and me both! I was misled by the intro description and didn't look
closer until I got the same results that you did.

Last resort? Read The Fine Manual.

See you around the newsgroups.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"zSplash" wrote in message
...
Thanks, Norman, for the help. I guess I just didn't read the

expanded help,
and assumed. Sorry.

So, how do I access (or install, if necessary) the "Analysis

Toolpack"
functions? This is new to me. (I don't see it in my References...)

st.

"Norman Harker" wrote in message
...
Hi zSplash!

I think that you are misunderstanding what DATEDIFF means by "w"

and
"ww" arguments.

Extract from Help:

When interval is Weekday ("w"), DateDiff returns the number of

weeks
between the two dates. If date1 falls on a Monday, DateDiff counts

the
number of Mondays until date2. It counts date2 but not date1. If
interval is Week ("ww"), however, the DateDiff function returns

the
number of calendar weeks between the two dates.

Both are counting weeks which is why in your case you are getting

the
same answer.

To count weekdays use the Analysis ToolPak NETWORKDAYS function.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and

Arguments)
available free to good homes.
"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I get
the same value for "w" (weekday) as I do for "ww" (week). What

am I
doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA








  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default DateDiff("w") -- problem

is it available under tools=Addins? If so, check both Analysis Tookpak
and Analysis Toolpak - VBA. The later contains the VBA callable versions of
the functions.

If not go to the control panel and do add/remove software and start office
install.

--
Regards,
Tom Ogilvy


zSplash wrote in message
...
Thanks, Norman, for the help. I guess I just didn't read the expanded

help,
and assumed. Sorry.

So, how do I access (or install, if necessary) the "Analysis Toolpack"
functions? This is new to me. (I don't see it in my References...)

st.

"Norman Harker" wrote in message
...
Hi zSplash!

I think that you are misunderstanding what DATEDIFF means by "w" and
"ww" arguments.

Extract from Help:

When interval is Weekday ("w"), DateDiff returns the number of weeks
between the two dates. If date1 falls on a Monday, DateDiff counts the
number of Mondays until date2. It counts date2 but not date1. If
interval is Week ("ww"), however, the DateDiff function returns the
number of calendar weeks between the two dates.

Both are counting weeks which is why in your case you are getting the
same answer.

To count weekdays use the Analysis ToolPak NETWORKDAYS function.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"zSplash" wrote in message
...
I am trying to count weekdays, using the "w" argument

unsuccessfully. I get
the same value for "w" (weekday) as I do for "ww" (week). What am I

doing
wrong?
Code:
estDays=DateDiff("w", ufm1.Calendar1, ufm1.Calendar2)

TIA








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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"DATEDIFF" LOCATION IN EXCEL 2007 dickvw Excel Worksheet Functions 1 December 14th 07 06:48 PM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 05:51 PM.

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

About Us

"It's about Microsoft Excel"