Gustav Brock
Gustav at cactus.dk
Mon Oct 23 04:58:40 CDT 2006
Hi Pedro Hmm ... unless you use global/public variables (which you cannot directly do within SQL) you have to pass the dates as parameters to a (any) function - or it won't know what to calculate. /gustav >>> pedro at plex.nl 20-10-2006 20:39 >>> Hello Gustav, this works. Thanks. But why do i have to call the function by: ISO_WorkdayDiff([DatOnt], [DatScr]) Normally i only use: ISO_WorkdayDiff(), in calling functions from an sql. Paul: your function also began working, but i received an Error after 2 records: Stack memmory error? Thanks Pedro ----- Original Message ----- From: "Gustav Brock" <Gustav at cactus.dk> To: <accessd at databaseadvisors.com> Sent: Friday, October 20, 2006 7:06 PM Subject: Re: [AccessD] difference in days > Hi Pedro > > This should do: > > SELECT > Datum.Rapnaam, > ISO_WorkdayDiff([DatOnt], [DatScr]) AS verschil > FROM > Datum; > > /gustav > >>>> pedro at plex.nl 20-10-2006 18:50:22 >>> > I tried the code from Paul first, but get an error: "You used an > inaccurate > number of arguments in a function" > The same error with the code from Gustav. > > What am i doing wrong. in my table there are two date fields: FromDate = > [DatOnt], ToDate = [datScr].