Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-25 : 08:51:39
|
| Sridhar writes "Hai,I have a SQL Statement where the Records should be retrieved from a table which is stored in SQL Server. I am using VB.NET Windows Form to add conditions to the SQL Statement. Form contains two DatetimePicker Controls where user selects the Starting Date and Ending Date. In Oracle there is a To_Date format where we can convert a string date to specified format. But How can I Compare the dates in SQL Server when the date format is of any type in user's Regional Settings.My SQL Statement is as follows:SELECT Creation_Date FROM PROPOSALS WHERE Creation_Date >= " & FROMDTPICKER.VALUE & " AND Creation_Date <= " & TODTPICKER.VALUE & "This is not giving me Exact Results. I tried it by writing a CONVERT FUNCTION. But of no use.Please specify a standard format so that the results should be exactly matched irrespective of the system dateformat.Thanks in AdvanceRegardsSridhar" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|