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 |
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-03-24 : 08:33:08
|
| Hi AllFollow up to my previous post, i am trying to pull last 24 hrs datai got some starnge result for a query.Any Idea,cst.DateCreated from cst WHERE cst.DateCreated > dateadd(hh,-9,getdate()) it pulls data around this time yesterday to the time execution now (24hrs) !!How?Regards,SG |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-03-24 : 08:56:05
|
| What is the data type for DateCreated and can you provide a sample value for it that is giving you the strange results?JimEveryday I learn something that somebody else already knew |
 |
|
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-03-24 : 09:09:48
|
| Thanks for you reply JimfData type for 'datecreated' -datetimeResult -> reterived data from - 2011-03-23 12:42:30.740 to the time of execution.I executed the query at 24.03.2011 13.08How its possible for this cst.DateCreated from cst WHERE cst.DateCreated > dateadd(hh,-9,getdate()) Regards,GS |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-03-24 : 10:01:45
|
| could you also give an example from DateCreated that was returned in your query that shouldn't have been. This is a strange problem and I'm wondering if what you think is in DateCreated is actually what's in there. It's been my experience that data dives sometimes turn in to dumpster dives.JimEveryday I learn something that somebody else already knew |
 |
|
|
|
|
|