By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,556 Members | 1,609 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

Help with DateAdd Function

P: n/a
rob
Hello all,

I have a report that is always due 14 weekdays (Monday thru Friday) from the
day it is suspensed.

I would like to use the DateAdd function using the weekday interval (
DateInterval.Weekday), but I've tried it and it returns the same value as
(DateInterval.Day).

Am I doing something wrong, or do I have the wrong expection for this
function?
BTW - I already worked out a solution (using Select-Case and weekday
function).

Feb 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
rob,

Based on this remark from the documentation, I would say that you have the
wrong expectation for the function:

"To add days to DateValue, you can use DateInterval.Day,
DateInterval.DayOfYear, or DateInterval.Weekday. These are treated as
equivalent because DayOfYear and Weekday are not meaningful time intervals."

Kerry Moorman

"rob" wrote:
Hello all,

I have a report that is always due 14 weekdays (Monday thru Friday) from the
day it is suspensed.

I would like to use the DateAdd function using the weekday interval (
DateInterval.Weekday), but I've tried it and it returns the same value as
(DateInterval.Day).

Am I doing something wrong, or do I have the wrong expection for this
function?
BTW - I already worked out a solution (using Select-Case and weekday
function).

Feb 11 '06 #2

P: n/a
rob
I have to ask the "obvious" question: then why have different functions if
date and weekday are equivelant?

"Kerry Moorman" <Ke**********@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
rob,

Based on this remark from the documentation, I would say that you have the
wrong expectation for the function:

"To add days to DateValue, you can use DateInterval.Day,
DateInterval.DayOfYear, or DateInterval.Weekday. These are treated as
equivalent because DayOfYear and Weekday are not meaningful time
intervals."

Kerry Moorman

"rob" wrote:
Hello all,

I have a report that is always due 14 weekdays (Monday thru Friday) from
the
day it is suspensed.

I would like to use the DateAdd function using the weekday interval (
DateInterval.Weekday), but I've tried it and it returns the same value as
(DateInterval.Day).

Am I doing something wrong, or do I have the wrong expection for this
function?
BTW - I already worked out a solution (using Select-Case and weekday
function).

Feb 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.