Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 10th, 2006, 08:16 AM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Code for review advice, is there a hole?

My objective is to create 8 values. These are date values for each quarter of the financial year, 4 start values and 4 finish values(dd/mm/yyyy):

01/07/2005
30/09/2005
01/10/2005
31/12/2005
01/01/2006
31/03/2006
01/04/2006
30/06/2006

To get the starting point : the start date(01/07/????) of the current financial year. If we are presently in the 1st until the 6th months we need to say year(date()-1) to come up with the previous year. Of if we are in the 7th until the 12th months we would say year(date()) because we need the current year - My question is have I missed anything? will I get the correct results no matter what the current month is on the local machine?

   IF Month(Date()) <= 7 THEN Adjustment = -1 ELSE Adjustment = 0 END IF
   FQStart = CDate("01/07/" & Year(Date())+Adjustment)
   SQStart = CDate("01/10/" & Year(Date())+Adjustment)
   TQStart = CDate("01/01/" & Year(Date())+Adjustment+1)
   FthQStart = CDate("01/04/" & Year(Date())+Adjustment+1)

   FQfinish = SQStart - 1
   SQfinish = TQStart - 1
   TQfinish = FthQStart - 1
   FthQfinish ="30/06/" & Year(FthQStart)


TYIA

Wind is your friend
Matt
__________________
Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
review my code vertex78 PHP Databases 0 May 12th, 2008 04:19 PM
Need advice to clean up my date manipulation code jasoncompo Beginning VB 6 1 June 2nd, 2006 01:29 PM
Code review tool madhukp ASP.NET 1.0 and 1.1 Professional 0 March 24th, 2006 01:54 AM
I just shot a hole in my Form (literally!) Ryden VB.NET 0 November 29th, 2004 09:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.