asp_web_howto thread: Fiscal Year, again
Message #1 by "John P. Miller" <jpmiller@a...> on Tue, 29 Jan 2002 10:39:54 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C1A8B1.499BA760
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I hate to be a pest, but I posted this question earlier and didn't get a
response, so I'm trying one last time.
I have an application that uses an ID for certain items. The first two
digits of the ID are the current fiscal year (01, 02, ...). The year
changes July 1st. Currently I have the value for this ID hard coded as
01, is there a way to code this into an if statement to get the ID to
change the ID to 02 on July 1 of each year?
Thanks in advance,
John Miller
jpmiller@a...
Message #2 by "Debreceni, David" <Debreceni.David@h...> on Tue, 29 Jan 2002 11:51:44 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1A8E5.3BA4FC90
Content-Type: text/plain;
charset="iso-8859-1"
I think this will do what you want, but not sure
basically this will do the number of days that are left till July 1 of the
current year. if it equals July 1, the number is zero or if it is past July
first the number is negative. I assigned the variable fiscal the year based
upon the result. Hope this works for ya.
if datediff("d", now(),"7/1/" & year(now())) > 0 then
fiscal = right(year(now()) - 1,2)
else
fiscal = right(year(now()), 2)
end if
David Debreceni
Developer
xxx-xxx-xxxx x 1086
-----Original Message-----
From: John P. Miller [mailto:jpmiller@a...]
Sent: Tuesday, January 29, 2002 10:40 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Fiscal Year, again
I hate to be a pest, but I posted this question earlier and didn't get a
response, so I'm trying one last time.
I have an application that uses an ID for certain items. The first two
digits of the ID are the current fiscal year (01, 02, ...). The year changes
July 1st. Currently I have the value for this ID hard coded as 01, is there
a way to code this into an if statement to get the ID to change the ID to 02
on July 1 of each year?
Thanks in advance,
John Miller
jpmiller@a... <mailto:jpmiller@a...>
$subst('Email.Unsub').
|