Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 June 6th, 2008, 04:53 AM
Authorized User
 
Join Date: Nov 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sanjeev jha
Default display all dates within months

My need to display all dates of 1 or 2 months previous from current dates
means if current date is 01-06-2008 then all date between 01-05-2008 to 01-06-2008. How can i do it.


sanjeev
__________________
sanjeev
 
Old June 6th, 2008, 12:46 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You may want to look at the DateAdd method:

http://www.w3schools.com/Vbscript/func_dateadd.asp

First, add a month to the current date (use -1 to go back in time), and then loop from the past date to the current date.

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
T-SQL Code to get last 6 months midway11 SQL Language 1 October 15th, 2006 08:59 AM
Query Help - Display numbers from two Months rkellogg Access 2 September 27th, 2006 08:51 AM
how to display weeks in between two dates? Pls hel nmmure Crystal Reports 0 July 13th, 2006 10:36 AM
Find months difference tsimsha Classic ASP Databases 4 February 14th, 2005 08:36 PM
Group By months for a range of dates singh_ginni SQL Language 2 September 8th, 2003 09:28 PM





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