Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use dates in WHERE in SQL Server
Message
From
10/06/2008 16:55:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01322704
Message ID:
01322931
Views:
14
Well I would repeat, don't build a string. Pass as a parameter. Why "has to be"?
Cetin

>Thank you, Cetin. Since I am creating a sting that has to be passed with Date value built-in, I changed my code to convert the Date variable to a string using DTOS().
>
>>No! This is the wrong way IMHO.
>>
>>
>>mDateVar = date(2008,6,1)
>>cSqlCommand = "select * from mytable where myDateTimeField >= ?m.mDateVar"
>>
>>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
Reply
Map
View

Click here to load this message in the networking platform