Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Posts
    1

    Unanswered: DateTime Problem for Cops

    Hello,
    I'm trying to create a query to show the number of moving violations issued per shift /per year for a police department. I'm using the following formula, working off an SQL DateTime Field:
    {ValidationSetEntry.Description} = "Uniform traffic citation"
    and
    ( {TicketAndCitation.TicketDateTime} >= "2005-01-01"
    and
    {TicketAndCitation.TicketDateTime} <= "2005-12-31" )

    this allows me to see the entire years worth of all tickets. I'm adding shift information like this:

    {ValidationSetEntry.Description} = "Uniform traffic citation"

    and

    ( {TicketAndCitation.TicketDateTime} >= "2005-01-01" + CTime("07:00:00 AM")

    and

    {TicketAndCitation.TicketDateTime} <= "2005-12-31" + CTime("03:00:00 PM") )

    But get no results. Anyone know how to properly set this up?
    Thanks,
    Merrill

  2. #2
    Join Date
    Feb 2007
    Posts
    348
    When I do a selection based on time it looks like:
    "ServiceDate">={ts '2004-01-01 00:00:00'}
    so, I guess, try dumping the double quotes and use a 24 hour clock.

Posting Permissions

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