Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server DateTime in SQL Select
Message
From
10/05/2010 11:05:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01463837
Message ID:
01463955
Views:
31
>>>>then that would be a problem. Period.
>>>>
>>>>Cetin
>>>
>>>But this is not the result I want.
>>>
>>>Ok, I ask you now to write me a query to return all records for today's date. Please write it using BETWEEN operator. My dates are stored with time portion.
>>>
>>>Thanks in advance,
>>
>>
>>dStart = date()
>>dEnd = date()+1
>>
>>select * from myTable where myDateTime between ?m.dStart and ?m.dEnd and myDate < ?m.dEnd
>>
>>Cetin
>
>I knew it in advance. You're still using 2 operators, not between only, so it's the same as
>
>myDateTime >= ?m.dStart and myDate < ?m.dEnd --which confirms my point.
>
>End of discussion.

Yes since you created the discussion in the first place with your own restrictions you have the right to confirm and end it:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform