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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 datatime

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-12-18 : 05:08:25
hello

i have to fields
field1-date
field2-time

field1:20081218
field2:103012

field1:20081217
field2:093012

i want to see 25 that mean 25 hours left

thanks


vijayakumar_svk
Yak Posting Veteran

50 Posts

Posted - 2008-12-18 : 05:19:18
I don't understand your expected result. What you are expecting? Do you need the difference or you need a date and time that 25 hrs after the first date and time?

==============================
Work smarter not harder take control of your life be a super achiever
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-12-18 : 05:36:48
quote:
Originally posted by vijayakumar_svk

I don't understand your expected result. What you are expecting? Do you need the difference or you need a date and time that 25 hrs after the first date and time?

==============================
Work smarter not harder take control of your life be a super achiever



i want to see the diffrence but the type of the field1,field2 is decimal.

i want to see the diffrence in hours.

thanks a lot
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-12-18 : 08:02:43
what can i do if i have "Null" of some rows in field1
Go to Top of Page
   

- Advertisement -