#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    3
    Rep 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?
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Colchester, England
    Posts
    131
    Rep Power
    15
    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).]

Similar Threads

  1. access report question
    By pumpkin head in forum Database Management
    Replies: 4
    Last Post: November 2nd, 2004, 02:10 AM
  2. Yet another Access / SQL-Server question
    By Haekel in forum MS SQL Development
    Replies: 5
    Last Post: February 5th, 2004, 09:09 AM
  3. Noob question: access of resources in web-apps
    By Waldmeister_ii in forum Java Help
    Replies: 4
    Last Post: January 30th, 2004, 11:37 AM
  4. Access 97 Question
    By darosen in forum Database Management
    Replies: 4
    Last Post: January 28th, 2004, 06:37 PM
  5. MS Access AutoNumber Question
    By techwreck in forum Database Management
    Replies: 1
    Last Post: January 26th, 2004, 10:55 PM

IMN logo majestic logo threadwatch logo seochat tools logo