I am looking to select records in a similar fashion to a recurring meeting. You could (but should not) make a really long meeting that starts on 1 day/time, and ends on another day/time several days later, but you should make a recurring meeting to properly manage your and your rooms' schedule. Using SQL parlance, I think I would like an inner join of the date range and the time range (the center one):Ī completely unrelated but similar example this phenomenon is similar to meetings in Outlook. We may not get data always in this format so here is the PHP code to convert to this format before. Here is the SQL for this SELECT FROM dttb WHERE dt BETWEEN '' AND '' Date Format to use in query You have seen we have used 'Y-m-d' date format in our query. Where the start date and end date are selectable and the start time and end time are selectable. Now let us move to select a range of records between two dates. However, that is not what I am trying to select.īasically, select the data that occurred on these days between the time of 2 pm and 10 pm. If I have a DateTime selection, I can choose September 1, 2 pm and October 31, 10 pm. I will reiterate: that is not my desired result.Īs a concrete, specific, example, I would like to use data that is valid for September 1 - October 31 where the thing I am reporting on happened between 2 pm and 10 pm EST on any or all of those days. I have tried adding a separate, second, parameter prompt for the just time, but that has the same result as changing the parameter prompt to a DateTime value. Both the prompts will refer to the same DateTime record in the database. Using a DateTime parameter prompt merely adds precision to the start and ending day/time of the report and does not do what I want. The date range is going to select a larger window of days, and the time range will select what times during the day the report will show the data. Using a prompt for a DateTime parameter does not do what I want. I would also like to add a prompt for a time range. I am currently able to prompt the user for a date range for my report using a parameter. The data source is MS SQL Server 2008 R2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |