Selecting based on date range
Jason Moehlman
jmoehlma at moehlman.com
Sun Jun 13 10:39:15 CDT 2010
Hi Ruslan,
On Jun 13, 2010, at 10:18 AM, Ruslan Zasukhin wrote:
> On 6/12/10 5:48 PM, "Jason Moehlman" <jmoehlma at moehlman.com> wrote:
>
> Hi Jason,
>
>> I am having an issue selecting a range of records using dates similar to:
>>
>> select * from treportdata where ( tsdatetime>='2010-06-01' ) and (
>> tsdatetime<='2010-06-30' ) order by tsdatetime
>>
>> VStudio immediately crashes, on Mac OS X.
>
> V4.6 ? else
>
> This should be reported to mantis, with crash log at least.
>
> If possible - small db also which reproduce this,
4.5.0 I will open a mantis case and upload. Even with only one of the where clause date items it crashes hard on OS X.
>
>> In RB the query returns no
>> results. Removing the date references and just selecting records like:
>>
>> select * from treportdata order by tsdatetime
>>
>> Works just fine. I am not sure if I am specifying the where clause wrong for
>> Valentina, this syntax works on several other DB types.
>>
>> Any help would be appreciated.
>
> Syntax looks correct for me ...
>
> What about this yet
>
> select * from treportdata
> where ( tsdatetime>='2010-06-01' )
> order by tsdatetime
>
>
> select * from treportdata
> where tsdatetime>='2010-06-01'
> order by tsdatetime
Neither of these work any better, crash out VStudio. After some more experimentation, I found that the following does work, and does not crash:
select * from treportdata where (tsdatetime>='06/12/2010 09:30:00') and (tsdatetime<='06/12/2010 10:00:00') order by tsdatetime
Is there Valentina settings that control the format of these datetime objects that I could bring this more in line with the other "SQLDATETIME" format like "YYYY-MM-DD HH:MM:SS" instead of "MM/DD/YYYY HH:MM:SS"?
Thanks!
Jason
More information about the Valentina
mailing list