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 |
immad
Posting Yak Master
230 Posts |
Posted - 2013-06-08 : 01:03:05
|
i am having this errorMsg 257, Level 16, State 3, Procedure query, Line 21Implicit conversion from data type datetime to float is not allowed. Use the CONVERT function to run this query.this is the line and red one is the column that i replace from 540CAST (ABS( t4.LTime - DATEDIFF (MINUTE, t.[Timein], t.[Timeout] ) ) % 60 as varchar ) + ' min' as excesshort, -- Minutesthis column t4.LTime datatype is datetimeimmad uddin ahmed |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-08 : 03:17:45
|
you cant apply ABS over datetime fieldthe result of t4.LTime - DATEDIFF (MINUTE, t.[Timein], t.[Timeout] ) would be a datevalue not a numeric onePlease elaborate on what you're trying to get and we may suggest an alternative------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
immad
Posting Yak Master
230 Posts |
Posted - 2013-06-08 : 07:18:26
|
i got it i change l4.ltime hours into minute then i replace t4.ltime to minute fieldimmad uddin ahmed |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-08 : 13:54:04
|
ok..good------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|