datetime without time
Posted: Tue Aug 05, 2014 4:01 pm
In our report we use a variable of type datetime to filter data. The init value is the current day.
When we select just a day (without time) in the filter, we can observe in SQL Profiler that the datetime variable contains the date and the time. Then we wait to minutes and submit the filter again, the time has not changed. It appears to be the time of viewer initialization.
If we start another instance of the same application, its queries contain the initialization time of the second instance.
Example: if instance one of the App is started on 12:30, we notice that the date variable in the submitted query contains that time, even only a date without time was selected in the filter. This time does not change, even if we click submit two minutes later. it is still 12:30.
When we select just a day (without time) in the filter, we can observe in SQL Profiler that the datetime variable contains the date and the time. Then we wait to minutes and submit the filter again, the time has not changed. It appears to be the time of viewer initialization.
If we start another instance of the same application, its queries contain the initialization time of the second instance.
Example: if instance one of the App is started on 12:30, we notice that the date variable in the submitted query contains that time, even only a date without time was selected in the filter. This time does not change, even if we click submit two minutes later. it is still 12:30.