Alpha Video Training
Results 1 to 8 of 8

Thread: 24 Hour time format in Report

  1. #1
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default 24 Hour time format in Report

    I have a table with two Shorttime fields indicating start and end of an activity.
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: 24 Hour time format in Report

    Quote Originally Posted by DVSOL005 View Post
    I have a table with two Shorttime fields indicating start and end of an activity.
    And your question is?

    Do these activities start one day and end the next day? Probably need a datetimestamp to get the length of time for the interval.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: 24 Hour time format in Report

    Quote Originally Posted by DVSOL005 View Post
    I have a table with two Shorttime fields indicating start and end of an activity.
    Sorry, something seems to be wrong with my desktop so I had to switch to another machine.

    I can enter data in those two fields in the 24 hour format, like 1645 will be stored as 04:45:00 00 am.
    I managed to display the required 24 hour format (16:45) on a form.
    Now I am trying to do the same in a report and so far after being at it all day, reading Wiki, msg board and trying all sort of possibilities, I am stuck.
    Whatever I have tried the time is displayed as 04:45 instead of 16:45
    Any help is much appreciated.

    Thanks
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  4. #4
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: 24 Hour time format in Report

    Al,

    Thanks for such a rapid reply while I was fighting with my PC's.

    Those activities are always on te same day, it is about producing invitation letters in which start and end times are to be inserted.
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  5. #5
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: 24 Hour time format in Report

    I see the same formatting options on a report that I do on a form and they seem to operate the same.

    Download and unzip my attached table. Add to your database. See if you see anything different.

    tm.zip

  6. #6
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: 24 Hour time format in Report

    Quote Originally Posted by DVSOL005 View Post
    while I was fighting with my PC's.
    Sorry to hear about a battle with a PC... Never fun and always seems to be a time waster....

    Looks like Stan has a handle on the issue. Shorttime is fun..

    Remember that this works...

    dim thistimetoday as T
    thistimetoday = <yourshorttimefield>

    then you have a datetimestamp with a date of today and the time of your shorttimefield - which can be formatted to just the time.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  7. #7
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: 24 Hour time format in Report

    Stan,
    Your example is exactly the way it should be. I created a simple report ( similar like yours) based on my table and that also shows the proper time format.
    Something must have been wrong with my original report as I could see results in the proper format but once I did a preview that showed the wrong format again.
    I have now recreated that report and the correct format is displayed.

    Thanks
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  8. #8
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: 24 Hour time format in Report

    Al,
    Problem is now solved. Required format appears in the report. The only thing is that when inserting the time field in RTF text, the formatting is limited.
    So that requires a slightly different approach.
    I now use a calculated value like: S_tim = VAL(TIME("0H",S_END))+":"+VAL(TIME("0M",S_END)) and the formatted time now looks like 16:45

    Thanks for your support.
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

Similar Threads

  1. 24 hour time format
    By peterth in forum Alpha Five Version 10 - Desktop Applications
    Replies: 1
    Last Post: 10-30-2009, 01:25 AM
  2. 24-hour Time format
    By John G in forum Alpha Five Version 9 - Desktop Applications
    Replies: 17
    Last Post: 10-30-2009, 12:21 AM
  3. Time Format (12 hour) without leading zero
    By gkpurcey in forum Archived Wishlist
    Replies: 2
    Last Post: 09-01-2009, 07:37 PM
  4. 24 Hour Time calcuations
    By Firemedic934 in forum Alpha Five Version 7
    Replies: 5
    Last Post: 06-22-2006, 08:19 AM
  5. add an hour to time()
    By martinwcole in forum Alpha Five Version 5
    Replies: 3
    Last Post: 11-12-2003, 06:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •