Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:05 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.