Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server DateTime in SQL Select
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01463837
Message ID:
01463882
Views:
32
I know. This is basically what Sergey already said. But right at the moment when I get the value from the DateTime field I get the entire value (date and time). And converting it to just date involves certain maintenance overhead. So I am thinking about making the change in the tool which retrieves the date and time and outputting only date. This is also a maintenance but only in one place.

>If you always only store the date in your datetime fields and never store time, then you can keep between.
>
>Just use ISO dates, e.g.
>
>select * from myTable where DateTimeField between '20100101' and '20100501'
>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform