Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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 March 3rd, 2004, 07:24 AM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default Time

Ive created a table with two times named cycle and hold. e.g 00:40:00 to represent 40 minutes. However when i call these in asp it displays them as 12.40.00 am, how do i change the format that it recognises that this is forty minutes not 12 in the morning. Ill also need to add these two number together to get a final time that will be used as part of a schedule ie new sceduled entry = last scheduled entry +holdtime + cycle time.

what would be the best way to do this?

thanks

Reply With Quote
  #2 (permalink)  
Old March 3rd, 2004, 10:40 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Why not save the timespans in the database as an integer value of minutes instead of a time? The database will always try to return you an actual time. An after all... 00:40:00 equals 12:40:00 AM.

You can add the minutes for "hold time" and "cycle time" to your "last entry" time by using the VBScript DateAdd function.

Peter
------------------------------------------------------
Work smarter, not harder.
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
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
How to display the time(running time) in Excel swaroop Excel VBA 1 March 29th, 2007 01:56 AM
Using xs:time to generate time in desired format krayan001 XSLT 0 June 27th, 2005 04:28 PM



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


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