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 |
|
erica686
Starting Member
13 Posts |
Posted - 2010-01-14 : 18:43:04
|
| I have the following query:select amountwhere tran_date >= getdate()the problem that i have is that the transaction date is: 15/01/2010 12:00:00 AM, but the getdate formula will give me 15/01/2010 9:36:AM. So all transactions for the 15th will be excluded.. is there anyway around this?Thanks,E |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-01-14 : 18:49:28
|
SELECT AmountFROM Table1WHERE TranDate >= DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-15 : 00:00:39
|
| also seehttp://visakhm.blogspot.com/2010/01/some-quick-tips-for-date-formating.html |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|