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.We ekday), but I've tried it and it returns the same value as
(DateInterval.D ay).
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). 2 3010
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.Da y,
DateInterval.Da yOfYear, or DateInterval.We ekday. 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.We ekday), but I've tried it and it returns the same value as (DateInterval.D ay).
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).
I have to ask the "obvious" question: then why have different functions if
date and weekday are equivelant?
"Kerry Moorman" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:66******** *************** ***********@mic rosoft.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.Da y, DateInterval.Da yOfYear, or DateInterval.We ekday. 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.We ekday), but I've tried it and it returns the same value as (DateInterval.D ay).
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). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chad Richardson |
last post by:
I've always been mistified why you can't use a column alias in the group by
clause (i.e. you have to re-iterate the entire expression in the group by
clause after having already done it once in the select statement). I'm
mostly a SQL hobbiest, so it's possible that I am not doing this in the most
efficient manner. Anyone care to comment on this with relation to the
following example (is there a way to acheive this without re-stating the...
|
by: NewmanBT |
last post by:
As you can see from the code below, several textboxes will be
dynamically created and each will be tied to an org. The
ChangeComment function should allow for an update to the database
whenever the value of the associated textbox changes. However, I'm
having trouble associating the textbox to the org. strOrg is a global
variable which changes throughout the runtime.
How do I capture its value at each stage a textbox is created so that...
|
by: PMBragg |
last post by:
ORINGINAL Post
>Thank you in advance. I'm trying to pull all inventory items from December
>of the previous year back to 4 years for my accountant. I know this can be
>done, but I'm drawing a blank. I've tried;
>
>DateDiff("y",-4,DateIn) and get errors
>
>Please any assistance would be greatly appreciated.
>
|
by: Alicia |
last post by:
Yes, but will that skip a week and group by the date for me? I
basically wanted something that would do a count of the dates, then
group them by their week name..
BEFORE:
Resource Date Total number of times that date Appeared
(Count)
4/3/03 4
4/4/03 2 (note 4/4/03 showed up twice)
|
by: Annette Massie |
last post by:
I am trying to insert a record into a table via code and one of the
values to add I would like as a dateadd calculation on a value from a
query.
My code looks like this:
Set db = CurrentDb() ' if the table is in the same database
Set rsAdd = db.OpenRecordset("tblClientTreatment")
With rsAdd
.AddNew
!ClientID = Me.ClientID
| |
by: ey.markov |
last post by:
Greetings,
I have an A2K application where for a report the user enters a
month-end date, and the system must gather transactions for that month.
No problem, I thought, I'll just use the DateAdd function for the
beginning of the date range, like this:
Between DateAdd("m",-1,!!) And
!!
|
by: C.Davidson |
last post by:
Does subject VB.net 2003 support DateAdd function? I have tried to
implement the following without success. In my example I tried to
simply add 30 months to 9/18/2003 and I get "New date: 12:00:00 AM",
no date
Example direct from VB Language Reference:
Public Overloads Function DateAdd(ByVal Interval As DateInterval,_
ByVal Number As Double, ByVal DateValue As DateTime) As DateTime
End Function
|
by: Rich Raffenetti |
last post by:
I have the following code. If I do the dateadd function with
dateinterval.minute, it works fine and the date/time value is displayed with
zero seconds. If I do the dateadd function with dateinterval.second, an
error is thrown saying I have an overflow. I would be happy to know if I am
doing something wrong or if I could do it differently to get the seconds to
display properly.
Const largeInteger As Long = &H1C5EA3B5F585F1F
Const...
|
by: mlcampeau |
last post by:
Hi guys,
I am trying to run a query that calculates when employees become eligible for supplemental vacation. This occcurs once the employee has reached 5, 10, 15, etc years of service. I got the query running great, it shows the correct dates, (5, 10, etc years after the HireDate) but I just found out that they don't want to know the exact anniversary date. People become entitled to their vacation January 1st of the year of their anniversary...
|
by: Mangler |
last post by:
I created a query in SQL that works fine but when i put it in the asp
code ( with dreamweaver ) i am getting an error when viewing the
page: expected end of statment...
rsBERProd_cmd.CommandText = "SELECT ISNULL(sum(case when type = 'BD'
and _dte = Convert(Char(8),GETDATE(),112) then qty else 0 end),0) as
Dayqty,ISNULL(sum(case when type = 'BD' and _dte between dateadd(dd,-
(day(GetDate())-1),GetDate()) and ...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |