On October 24, 2014 12:08:14 AM EDT, Tracy Pearson <[email protected]> 
wrote:
>  On October 23, 2014 11:50:36 PM EDT, Sytze de Boer
>  <[email protected]> wrote:
>  >  Tracy, thank you, but it gives me a Function argument, type, or
>  count
>  >  is
>  >  invalid
>  >  I began with
>  >  dFiscalstart=ctod("01/02/2000")
>  >  
>  >  Did I do wrong ?
>  >  
>  >  
>  >  On Fri, Oct 24, 2014 at 4:40 PM, Tracy Pearson
That's what I get for not trimming...

Here is what I meant to send.

If you copy and pasted, some odd character may have gotten in there.

Dan suggested a function that you pass the invdate and dFiscalStart into that 
will return the year. So the code I added to your select statement would go 
into the function and return the year. Your select statement would then be 
simplified to 
FiscalYear(invdate, dFiscalStart) as year

FUNCTION FiscalYear
    LPARAMETERS dDate, dFiscalStart
    RETURN IIF(dDate >= DATE(YEAR(dDate), MONTH(dFiscalStart), 
DAY(dFiscalStart)), 1, 0) + YEAR(dDate)
ENDFUNC
-- 
Tracy

-- 
Tracy

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to