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 |
|
ahaile
Starting Member
25 Posts |
Posted - 2010-11-17 : 11:35:59
|
| I am working on a report using Microsoft Report Designer (VS 2005). I am trying to creat a parameter for start date and end date for UK users in UK time format. I need to build a parameter to display in UK DATE format (yyyy/mm/dd). Then I need to pass the selected UK @startdate and @enddate into the main SQL query in US time format (yyyy/dd/mm).Here is my prameter:Select distinct CONVERT(VARCHAR(11),startdate,103)as startdatefrom tablewhere @startdate > '2010/20/10' 'US DATE FORMATEand order by startdateHere is the expected Result:startdate (no duplicate startdate needed)2010/21/102010/22/102010/23/102010/24/10...Here is my main sql:select * from table2where @startdate between @startdate and @enddateI appriciate any assitant or direction on this.Expected value for @startdate and @enddate is US date format.Thanks |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
ahaile
Starting Member
25 Posts |
Posted - 2010-11-17 : 13:26:44
|
| Brett - I need to run a SQL query that returns dates in UK format from SQL 2000 database (The dates in the database are in US format). Then I need to use the UK returned date as variable to run another SQL statemnt, but prior to running the second SQL query I need to convert the dates back to US.Does this makes sense? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|