filtering date and time in report problem 
Author Message
 filtering date and time in report problem

I have a problem with a report.
I wish to filter record between a start date&time and end Date&Time
The filter is somthing like this
Date&Time => Glo:Sdate&Glo:Stime and Date&Time <= Glo:Edate& Etime

it works well within the same day but if i
select transactions recorded after midnight on the next day
it gives me incorrect results in my report it adds readings which
don't exist in the criteria
If anyone has done a report like this could you please advise me.

Regards Sam



Tue, 04 Dec 2001 03:00:00 GMT  
 filtering date and time in report problem
Hi Sam,

            your combination will only work within the same day as you have
found out.  I had the same problem with the combination of months and year
for a record.  Try:

(REC:Date    =    GLO:StartDate      AND      |
REC:Time     =>  GLO:StartTime     AND      |    ! only check the time on
the same day
REC:Date     =    GLO:EndDate      AND       |
REC:Time    <=   GLO:EndTime)     OR         |  ! only check the time on the
same day

(REC:Date    >    GLO:StartDate      AND      |
REC:Date     =    GLO:EndDate      AND       |
REC:Time    <=   GLO:EndTime)     OR         |  ! only check the time on the
same day

(REC:Date    =    GLO:StartDate      AND      |
REC:Time     =>  GLO:StartTime     AND      |    ! only check the time on
the same day
REC:Date     <    GLO:EndDate       OR         |

(REC:Date    >    GLO:StartDate      AND      |
REC:Date     <    GLO:EndDate)

This logic will include Records
FROM      GLO:StartDate / GLO:StartTime
TO            GLO:EndDate  /  GLO:EndTime

If you wanted to include only a specific time range on within the date range
you will have to change this filter.
The above can be written easier - but I think this way you can follow the
four different scenarios.  In order to validate the record the time should
only be taken into account if the REC:Date and your RangeDate are the same.

HTH
Jes

Programming is:  When you turn a good idea into CODE.
We all wish an hour had a hundred minutes --
did anyone ask the minutes about this ?

Quote:

>I have a problem with a report.
>I wish to filter record between a start date&time and end Date&Time
>The filter is somthing like this
>Date&Time => Glo:Sdate&Glo:Stime and Date&Time <= Glo:Edate& Etime

>it works well within the same day but if i
>select transactions recorded after midnight on the next day
>it gives me incorrect results in my report it adds readings which
>don't exist in the criteria
>If anyone has done a report like this could you please advise me.

>Regards Sam



Tue, 04 Dec 2001 03:00:00 GMT  
 filtering date and time in report problem
I have gotten tired of dealing with the report formater myself.  What
I do for most all of my reports is to manually print each band instead
of relying on clarion to do it.  I define the main file and what key
to use as well as where in the file to start.  I then write the code
in the before detail print embed telling it when to print each band
and when not to.  This works great for me and allows much more
flexability.  Of course I am sure I have not correctly explained this
but hope it helps.
Lee



Quote:
>Hi Sam,

>            your combination will only work within the same day as you have
>found out.  I had the same problem with the combination of months and year
>for a record.  Try:

>(REC:Date    =    GLO:StartDate      AND      |
>REC:Time     =>  GLO:StartTime     AND      |    ! only check the time on
>the same day
>REC:Date     =    GLO:EndDate      AND       |
>REC:Time    <=   GLO:EndTime)     OR         |  ! only check the time on the
>same day

>(REC:Date    >    GLO:StartDate      AND      |
>REC:Date     =    GLO:EndDate      AND       |
>REC:Time    <=   GLO:EndTime)     OR         |  ! only check the time on the
>same day

>(REC:Date    =    GLO:StartDate      AND      |
>REC:Time     =>  GLO:StartTime     AND      |    ! only check the time on
>the same day
>REC:Date     <    GLO:EndDate       OR         |

>(REC:Date    >    GLO:StartDate      AND      |
>REC:Date     <    GLO:EndDate)

>This logic will include Records
>FROM      GLO:StartDate / GLO:StartTime
>TO            GLO:EndDate  /  GLO:EndTime

>If you wanted to include only a specific time range on within the date range
>you will have to change this filter.
>The above can be written easier - but I think this way you can follow the
>four different scenarios.  In order to validate the record the time should
>only be taken into account if the REC:Date and your RangeDate are the same.

>HTH
>Jes

>Programming is:  When you turn a good idea into CODE.
>We all wish an hour had a hundred minutes --
>did anyone ask the minutes about this ?


>>I have a problem with a report.
>>I wish to filter record between a start date&time and end Date&Time
>>The filter is somthing like this
>>Date&Time => Glo:Sdate&Glo:Stime and Date&Time <= Glo:Edate& Etime

>>it works well within the same day but if i
>>select transactions recorded after midnight on the next day
>>it gives me incorrect results in my report it adds readings which
>>don't exist in the criteria
>>If anyone has done a report like this could you please advise me.

>>Regards Sam



Tue, 04 Dec 2001 03:00:00 GMT  
 filtering date and time in report problem
Sam, the problem is that not always the value for the time will have 7
digits on it, and in that case it will not add leading zeroes, so, you all
have to do is FORCE leading zeroes by :



I tried it in a similar situacion and worked fine.

HTH

Quote:

>I have a problem with a report.
>I wish to filter record between a start date&time and end Date&Time
>The filter is somthing like this
>Date&Time => Glo:Sdate&Glo:Stime and Date&Time <= Glo:Edate& Etime

>it works well within the same day but if i
>select transactions recorded after midnight on the next day
>it gives me incorrect results in my report it adds readings which
>don't exist in the criteria
>If anyone has done a report like this could you please advise me.

>Regards Sam



Tue, 04 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Create Time / date or Modified Time / date of a txt file

2. convert labview date/time to excel date/time

3. DOS compressed date/time into real date/time

4. Filter on process or report does not work the second time

5. Run time report filter

6. please help stuck with report date and time

7. digital filter, dsp, real-time-filtering example

8. Report Filter Problem

9. Problem Filtering Reports

10. Report Writer Filtering Problem

11. Problem with Report Filter

 

 
Powered by phpBB® Forum Software