Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving date and time and getting date
Message
 
 
To
01/03/2010 07:57:07
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01450712
Message ID:
01451736
Views:
46
>>IMHO you are doing it extrememly wrong. It would miss almost all the records but include maybe a few that occurred in the last second to midnight. It is simply:
>>
>>
xFirstDate = date()
>>xLastDate = date() + 1
>>
>>... where ... myDateTime >= ?m.xFirstDate and myDateTime < ?m.xLastDate
>>
>>or:
>>
theDate = date()
>>... where ... myDateTime >= ?m.theDate and myDateTime < ?m.theDate + 1
>>
>>
>>and as I said before you can use indexes on computed columns to benefit indexes on 'expressions'. Depending on your searching needs you might even benefit from partitioning the table and the index.
>>
>>PS: Borislav was right you understood what he is saying wrong. While the milliseconds sensitivity in SQL server is 3 milliseconds, he meant you would miss any records after 23:59:59.000. In other words you are leaving this window open:
>>
>>23:59:59.000 to 24:00:00.000
>>
>>Cetin
>
>I thought VFP consider milliseconds too with -1 from tomorrow. If it doesn't consider when xlastdate, it doesn't consider when saving my records too. So there isn't any problem.
>
>Anyway I have to accept your method more simply mine... :) I'll use yours.

How is it different from what I suggested 5 days ago in the Message ID: 1450719 ?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform