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 March 17th, 2005, 07:52 AM
Registered User
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Looping Time

Hello to everyone and anyone. I'm new to ASP and to this forum.

Here's what I'm having a problem with. I need ASP to do the following:
(1) take the starttime in one database field (SQL Server), (08:00:00 AM)
(2) take the endtime in another database field (SQL Server), (05:00:00 PM)
(3) add 30 minutes to the starttime, and
(4) display the result of the each new starttime.

It needs to continue to do these steps until the new starttime is less than or equal to the endtime. My code produces an infinite loop for whatever reason. Here's my code.

<%
Dim strSatOpen
Dim strSatClosed
Dim strSatapptframe
Dim addTime

strSatOpen = ("8:00 AM")
strSatClosed = ("5:00 PM")
strSatapptframe = "30"
addTime = DateAdd("n",strSatapptframe,strSatOpen)

Do While addTime <= strSatclosed
Response.Write "<br>" & addTime
addTime = addTime + strSatapptframe
%>

Any and all help is greatly appreciated. :)




 
Old March 17th, 2005, 07:26 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Cross post - solution at - http://p2p.wrox.com/topic.asp?TOPIC_ID=28101

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
synchronizing pocket pc time with desktop time bobbyrayudu83 C# 1 April 2nd, 2011 04:28 AM
Time Shift time in minus time out lechalas Beginning VB 6 1 August 11th, 2008 01:56 PM
time zone & day light time rajn ASP.NET 1.0 and 1.1 Professional 0 August 7th, 2007 05:02 PM
Using xs:time to generate time in desired format krayan001 XSLT 0 June 27th, 2005 04:28 PM





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