Stonefield Query
 
Stonefield Site Map
Stonefield Support

  Overview
  Submit Support Ticket
  Forums
  Online Help Files
  Services
  Pre-Sales Support
Online Webinars
Video Demonstrations
Feature Requests
  Software Maintenance
  Support Testimonials
  FAQ's
Quick Links
Buy Now!
Download Free Trial
Watch a Video
Contact Us

 
 You are here: Support * Support Forums   Search

 Stonefield Query Support Forum

Welcome to the Stonefield Query Support Forum. Please note that in order to participate in the support forums, registration at our site is required. If you are already a member of our site, please sign-in.

 

Subject: Date issue with SQL

You are not authorized to post a reply.   

Author Messages
denisv
Posts:56

07/01/2008 11:24 AM Alert 

Version 3.04.2510 SF Professional

Have a report against QW using the Created field to identofy range of dockets used.

If I use Created Between Date1 and Date2 (ask at runtime) it does not include records for Date1 and Date2 only what is netween Date1+1 and Date2-1

If I change to Created Greater than or equal to Date1 (ask at runtime) and Created Less than or equal to Date2 (ask at runtime)

Again it does not include records on Date1 or Date2.

How can I get around this.

Chris Wolf
Posts:217

07/01/2008 11:45 AM Alert 

This is because those date fields are actually stored as DateTime fields in the database but Stonefield Query displays them as just Date fields by default.

You can have Query display the Time by editing the field, going to the Format tab then unchecking "Use default format" and "Display date only".

Then when you filter on these fields you can include a Time as well as a Date.


- Chris Wolf
Stonefield Software Inc.
denisv
Posts:56

07/01/2008 11:53 AM Alert 
Ok but can it work by using date only as typically the user will not want to enter the time as well.
denisv
Posts:56

07/01/2008 12:00 PM Alert 
Also, as I have already created an advanced layout the fields for the report are greyed out and I can't select properties to change that format. Can I get around that ?
Chris Wolf
Posts:217

07/01/2008 12:09 PM Alert 

In this case you will need to make your date range one date longer.

This is because Query uses a default of 12:00:00 AM for the Time portion of the filter.

For example if you filter on: CreateDate is between 01/01/2008 and 01/31/2008
this is actually sent to the DB engine as: CreateDate is between 01/01/2008 12:00:00 AM and 01/31/2008 12:00:00 AM

So anything after 12:00:00 AM on 01/31/2008 will not be included on the report.

In this case you would instead want your filter to be: CreateDate is between 01/01/2008 and 02/01/2008


- Chris Wolf
Stonefield Software Inc.
You are not authorized to post a reply.



ActiveForums 3.6

 
 
   Privacy Statement  |  Terms Of Use
© 1996-2008 Stonefield Software Inc. All rights reserved.