473,657 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DateDiff Error! Wrong Number of argument

To all!
I use the DateDiff function using VB6 and get this error 'Wrong number of
argument or invalid property assignment' ... have anyone seen this problem?
thanks ....
Jul 17 '05 #1
2 7142
"News Central" <Ba*@Bay.com> wrote in message news:<Ya******* *************@b aytsp.com>...
To all!
I use the DateDiff function using VB6 and get this error 'Wrong number of
argument or invalid property assignment' ... have anyone seen this problem?
thanks ....


No. Post your code.

Do you have something else named 'DateDiff'? (right click on the
function name in your code and select 'Definition' to see if it takes
you somewhere unexpected).

When you enter DateDiff( what does intellisense show?

Does using VBA.DateDiff work?
Jul 17 '05 #2
you're right, somewhere in my codes, there is a function called DateDiff....
:> thankls
"Bob Butler" <bu*******@eart hlink.net> wrote in message
news:fa******** *************** **@posting.goog le.com...
"News Central" <Ba*@Bay.com> wrote in message

news:<Ya******* *************@b aytsp.com>...
To all!
I use the DateDiff function using VB6 and get this error 'Wrong number of argument or invalid property assignment' ... have anyone seen this problem? thanks ....


No. Post your code.

Do you have something else named 'DateDiff'? (right click on the
function name in your code and select 'Definition' to see if it takes
you somewhere unexpected).

When you enter DateDiff( what does intellisense show?

Does using VBA.DateDiff work?

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4092
by: CJM | last post by:
I have an ASP page that lists files and folders in a directory. I'm using a cookie to record the last time this page was visited, and I intend to show links that are created/modified from that date minus 30mins to the present... eg effectively new and modified files: If DateDiff("n", subfolder.DateLastModified, sLastVisit ) < 30 Then.... etc On my test machine this mechanism works OK, but on the live server (Win2k, IIS5) I get some...
8
5922
by: inamori | last post by:
I face that problems 07/01/2003 06/30/2006 ---------> it should be 3 01/01/2003 02/28/2005 --------->could i get 2 years and 2 months 01/01/2003 03/01/2005 --------->could i get 2 years and 2 months and 1
6
16510
by: Lofty | last post by:
Hi all. I have to write an app that interacts with mySQL (I really must have done some evil, evil stuff in a previous life to be landed with this!) I need to work out the difference in days between values in the database and the current date. "No problem," thought I , "I'll just use the SQL DATEDIFF command." Heh! Well, the user interface I'm using didn't even recognise DATEDIFF as being a function, so I decided to visit the mySQL...
4
12172
by: John Smith | last post by:
Hi, I'm having trouble working out the best way of calculating the time difference between two times on the same day. The example I have found does return the hours (in this case 8) but forgets the minutes. I am looking to return the hour & the minute but i've had a look at the dateDiff format and this doesn't seem possible ?
3
3348
by: T23Ij9 | last post by:
Hi. I have 3 seperate date fields. InitialDate InspDate ReportDate I am trying to setup several unbound Text boxes in a form that will give me days elapsed between these dates. These text boxes act like message boards to alert the user if the days elapsed have exceeded a certain amount of
7
15488
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using DateDiff in VB.NET which is only available in C# if you don't mind linking in Microsoft.VisualBasic.dll to your C# application. I wanted to avoid this so set about a pure C# solution which uses a combination of TimeSpan in whole days and the...
6
7641
by: kevinjwilson | last post by:
I am trying to get the date difference between two dates but I don't want the function to include weekends in the calculation. Does anyone have an idea on how to make this work?
4
6104
by: KA NMC | last post by:
I know this is very simple...but the syntax is really screwing me up...Basically what I want to do is have this query check for orders that have been open two hours and more and does not have a quoted price...a small snippet of my query with out all my inner joins is: select customer.customer_id_string, ordr.order_no, ordr.order_date.... from cus... join on ...cus = ... where (customer.customer_id_string like '12345' and datediff(hour,...
4
3961
by: Brita | last post by:
You guys have been life savers for me, and I appreciate your help so much. I am trying to check the difference in days between two submitted requests. DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); Date firstDate = df.parse(firstRequest); Date secondDate = df.parse(secondRequest); int requestDays = DateDiff(dd, firstDate, secondDate);
2
2765
by: muddasirmunir | last post by:
i am using vb 6 , i had place two datepicker in form now i want to calcuate differcen of month in two date for this i used the function datediff i had try it withh many syntax but getting error like datediff(mm,date1,date2) datediff(mmm,date1,date2) datediff(month,date1,date2) datediff("mm",date1,date2) datediff("mmm",date1,date2) datediff("month",date1,date2)
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7320
agi2029
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...
1
6163
isladogs
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...
0
5632
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();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.