MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 26th, 2000, 01:51 PM
jp1878 jp1878 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 3 jp1878 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I realize this might not be the correct place to ask, but I need some help formatting the following:

I take end_time and subtract start_time.

This of course gives me a loooonnnggg decimal number.

I need to format 1.5 hours to read 1:30.

Any help?

Reply With Quote
  #2  
Old October 27th, 2000, 06:03 AM
eaamj01 eaamj01 is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Colchester, England
Posts: 131 eaamj01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 8 sec
Reputation Power: 9
This not the right place to be posting access questions. I assume you are using Access as a learning tool before you migrate to MySQL! but since you are here:

make sure that your datatypes are "short time" (24:00 hour clock).

Here is a vb example of time duration:

' eg StartTime 23:00 , EndTime = 01:00
' If the times span midnight add 24 to enddtime eg (01:00 + 24:00) - 23:00 = 2 hours
If txtEndTime < "12:00:00" And txtStartTime > "12:00:00" Then
txtEndTime = DateAdd("h", 24, txtEndTime)
End If
'This only works with durations of less than 24 hours
txtDuration = txtEndTime - txtStartTime

Andy J

[This message has been edited by eaamj01 (edited October 27, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Access DB Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT