To All
Just curious if FiveWin has a FW function to calculate a Fiscal Year .. like:
dDate := ctod("06/27/2020")
nFy := Whatever_function( dDate )
nFy should = 2020
Thanks
Rick Lipkin
function FYE( dDate, lAsLabel )
local y
DEFAULT dDate := Date()
y := YEAR( dDate ) + If( MONTH( dDate ) > 3, 1, 0 )
if lAsLabel == .t.
return Str( y - 1, 4 ) + "-" + StrZero( y % 100, 2 )
endif
return y
//----------------------------------------------------------------------------//
function BOFY( dDate )
return STOD( Str( FYE( dDate ) - 1, 4 ) + "0401" )
//----------------------------------------------------------------------------//
function EOFY( dDate )
return STOD( Str( FYE( dDate ), 4 ) + "0331" )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 51 guests