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 |
|
asif372
Posting Yak Master
100 Posts |
Posted - 2011-08-01 : 01:02:38
|
| I Want to Divide Time by 3.5 how Can I Do thisJust Like Thisselect (Getdate() /3.5)THANKS In Advance |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-08-01 : 01:19:19
|
what do you mean "divide time by 3.5" ? Please explain with sample data and expected result KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
flamblaster
Constraint Violating Yak Guru
384 Posts |
Posted - 2011-08-01 : 01:29:23
|
| Seems strange, but I've asked stranger stuff.Are you looking for something like this:SELECT CONVERT(TIME,DATEADD(SS,((DATEPART(HH, GETDATE())*3600+ DATEPART(MI, GETDATE())*60+ DATEPART(SS, GETDATE()))/3.5),'19010101')) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-01 : 04:32:16
|
| what mean does it make? dividing current time by 3.5? may be you're looking at taking time interval and then manipulating it.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-08-08 : 09:38:22
|
| Multiplication and division on DATETIME column do not make any sense. Thats why It is possible to useselect getdate()+1,getdate()-10whereas it is not possibleselect getdate()*2,getdate()/10MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|