Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Filter to "End of Month Date Time" Web Intelligence Rich Client Version 12:4:0

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good afternoon. I am creating a report that I want to filter at the query stage so it only selects those whose discharge date and time is less than or equal to a certain (prompted) date. The problem that I can see is that the calendar will only show the date. So I can't use "Less than or equal to" from the drop-down list as it appears to exclude, for example, 30th June 2015 15:30.

I have got round this issue by setting the end date as less than the first of the following month, which works, but that doesn't quite seem right.

Any thoughts please?

Many thanks,
D€$
 
Hi,

Why does less than the first of the month not seem right. It includes every single Minute:Second prior to that month, does it not? That is unless you wish to exclude Times between 30 June 15:30 and 1 Jul???

In fact to get rows including everything for today, quite often I'd use

Code:
where [The Date] >= Date And [The Date] < Date + 1

where [The Date] includes Time.

SOP!
 
Hi Skip, yes it does but I know that when people run reports and see a prompt they usually put the final day of the reporting month as the "End of Period". If that's the best way then I'll stick with it. Thanks.

Many thanks,
D€$
 
You know that it is possible to modify the SQL. You could use the INT() of the field value. So then Less Than Or Equal To would work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top