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 |
|
vidhya
Posting Yak Master
108 Posts |
Posted - 2008-04-15 : 07:48:38
|
| hi friends,how to display the records for this week?for today i used this query to dispaly the valuesselect count(*) from tbl_voting v,tbl_lkvotefor l where v.voteforid=l.voteforid and v.creationdatetime=CONVERT(VARCHAR(10), GETDATE(), 101) |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-15 : 08:01:57
|
Is your week monday to sunday? E 12°55'05.25"N 56°04'39.16" |
 |
|
|
vidhya
Posting Yak Master
108 Posts |
Posted - 2008-04-15 : 08:04:38
|
| today is tuesday. i need monday & tuesday records to display |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-15 : 08:14:57
|
[code]SELECT *FROM Table1WHERE Col1 >= DATEADD(WEEK, DATEDIFF(WEEK, '19000101', GETDATE()), '19000101') AND Col1 < DATEADD(WEEK, DATEDIFF(WEEK, '19000101', GETDATE()), '19000108')[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
vidhya
Posting Yak Master
108 Posts |
Posted - 2008-04-15 : 08:31:13
|
| thanks its working fine |
 |
|
|
|
|
|