Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2005

Tip: Looking for answers? Try searching our database.

Difference between two Date Fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
david.millar@orange.net - 09 Jun 2005 12:19 GMT
I have two date fields, "Approved" and "StartDate" that stem from date
pickers.

I would like to do a calculation to find out the no of days difference
between these two fields and publish it on the same form in a field
called "DaysToFill".

I tried to use the code in the posting "Date minus Date" but was
unsuccessfull.

Can soemone help with this. I have no programming experience so will
need walked through it.

Thanks
Nic Roche - 09 Jun 2005 13:06 GMT
<snip src="MSDN">

>I have two date fields, "Approved" and "StartDate" that stem from date
> pickers.
[quoted text clipped - 10 lines]
>
> Thanks
Nic Roche - 09 Jun 2005 13:06 GMT
> I tried to use the code in the posting "Date minus Date" but was
> unsuccessfull.

<snip src="MSDN">

Function DiffADate(theDate)
  DiffADate = "Days from today: " & DateDiff("d", Now, theDate)
End Function

</snip>

Nic Roche

>I have two date fields, "Approved" and "StartDate" that stem from date
> pickers.
[quoted text clipped - 10 lines]
>
> Thanks
david.millar@orange.net - 10 Jun 2005 10:40 GMT
Sorry Nic, I am not sure what you are meaning.
Henning Krause [MVP - Exhange] - 10 Jun 2005 10:44 GMT
Hello,

which programming language are you using for the code?

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

> Sorry Nic, I am not sure what you are meaning.
david.millar@orange.net - 14 Jun 2005 14:42 GMT
I am not sure. The advice that was posted in the "Date minus Date" post
says to use Microsoft script editor.
Henning Krause [MVP - Exhange] - 14 Jun 2005 16:29 GMT
Hello,

well, the advice given was in vbscript.. The default script language in
InfoPath is JScript....

Look under Tools --> Form Options for the language you are using.

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

>I am not sure. The advice that was posted in the "Date minus Date" post
> says to use Microsoft script editor.
T.Coita@gmail.com - 15 Jun 2005 09:21 GMT
Or you can convert your date in julian and add the number of day that
you wan't and after convert in your standard date!

julian :  2 january 2005 is 2.2005

Hope this help
david.millar@orange.net - 15 Jun 2005 11:41 GMT
The form is set to use JScript.

Regards

David
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.