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 |
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-02-07 : 06:25:49
|
| Hi guys can you give a query where I can get my data filtered by date..(a.jetTransactionDate between 01 / 01 / 01 / 2007 AND CONVERT(DATETIME, '2007-01-30 00:00:00', 102))but I can't get the data for January instead all transactions for the past years have been includedthanks!:) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-07 : 06:38:08
|
| a.jetTransactionDate >= '1 Jan 2007' AND a.jetTransactionDate<='31 Jan 2007'i assume jetTransactionDate field is of datetime datatype |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-02-07 : 06:48:06
|
| this is the sample data in jetTransactionDate field 3/8/2006 11:19:12 AM |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-02-07 : 06:48:48
|
| okay thanks! :) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-02-07 : 07:08:57
|
| Better usagejetTransactionDate >='20070101' and jetTransactionDate <'20070201'MadhivananFailing to plan is Planning to fail |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-02-07 : 07:43:58
|
| May I know the the shortcut for the months of February to December" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-02-07 : 08:17:13
|
quote: Originally posted by eem_2055 May I know the the shortcut for the months of February to December"
month not in ('January')???What do you mean?MadhivananFailing to plan is Planning to fail |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-02-07 : 08:41:36
|
| thanks:)Madhivanan and visakh16 thanks a lot! |
 |
|
|
|
|
|