Results 1 to 2 of 2

Thread: 15 minute format

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Montréal, Québec Canada
    Posts
    202

    15 minute format

    Hail,

    Database shows appointments for all times of day. They want to "group" them per quarter of hour so that an appointment for 9:05 is part of the 9:00 group while 10:15 is part of 10:00. The only way I have found so far is to use if statements in my query for the minutes part basically saying if it's :00 then do -15 minutes, between 01: and :15 input :00, between :16 and :30 input :15, and so forth. Is there an easier way?

    Phailak

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    There are 4 * 15 minutes in and hour, it's rather easy to check - don't you think ? =).

    Just convert the last 2 letters(after the ":") to a Long or an Integer value, and see how big it is, it's you can do it with Case or If - anyways it's easy.

    Cheers!
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

Posting Permissions

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



Click Here to Expand Forum to Full Width