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 |
|
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-07-15 : 09:32:48
|
| what is the syntax for displaying a date for example "displaydate" for at least 60 days?Roger DeFour |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-07-15 : 09:44:59
|
SELECT *FROM dbo.Table1 WHERE DisplayDate >= DATEADD(DAY, -60, GETDATE()) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-07-15 : 09:51:50
|
| what syntax i would use to seek the display date for 60 days or more for any given date?Roger DeFour |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-07-15 : 09:55:02
|
"60 days or more" of what?Do you mean within 60 days of a ny given date?select * from dbo.table1 where displaydate between dateadd(day, -60, @Mydate) and dateadd(day, 60, @mydate) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
chetankdave
Starting Member
1 Post |
Posted - 2011-07-15 : 16:39:06
|
| I Have Table which have field called total_min (decimal) and total_hours(datetime) i have total_min data i want to add total_min to total_hours but in time format how can i do this kindly suggest QueryChetan Dave |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-07-19 : 05:31:00
|
| select dateadd(minute, total_min,total_hours) from tableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|