A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Inserting DAYS360 formula



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2004, 10:26 AM
Deepak
external usenet poster
 
Posts: n/a
Default Inserting DAYS360 formula

hi

I have three field
lastdate
activedate
count

I have a field "average" which i require to calculate the number of days:
e.g.

average = days360 (lastdate, activedate, false)

how can i use this formula and that the result should be stored in the
"average" field.

kindly help

Reg
Deepak


  #2  
Old June 8th, 2004, 11:24 AM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default Inserting DAYS360 formula

Days360 is an Excel function, not an Access one. You can set a reference to
Excel and use it by wrapping it up as an Access function something like
this:

Function XL360(Arg1, Arg2) As Double
Dim objXL As New Excel.Application
XL360= objXL.WorksheetFunction.Days360(Arg1,Arg2)
Set objXL = Nothing
End Sub

Now you can use it like this:

XL360("1/1/2004", "12/31/2004")

which should return 360
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access


"Deepak" wrote in message
...
hi

I have three field
lastdate
activedate
count

I have a field "average" which i require to calculate the number of days:
e.g.

average = days360 (lastdate, activedate, false)

how can i use this formula and that the result should be stored in the
"average" field.

kindly help

Reg
Deepak




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.