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