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 2000 Forums
 SQL Server Development (2000)
 TWO DIFFERENT TIME DIVISION

Author  Topic 

Rohit Modesara
Starting Member

1 Post

Posted - 2013-01-20 : 07:22:15
Hi all plz help me on below mentioned scenario :

Hour1 Hour2 PERCENTAGE
3:25:00 6:58:45 49%

Where PERCENTAGE = HOUR1 / HOUR2

Can any plz let me know how to get above result in SQL Server 2000.

Thanks a lot in advance........

Rohit Modesara

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-01-20 : 11:49:38
[code]DATEDIFF(mi,0, CAST('3:25:00' AS DATETIME))*100.0/DATEDIFF(mi,0,CAST('6:58:45' AS DATETIME))[/code]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-21 : 03:30:40
see logic here

http://visakhm.blogspot.in/2012/07/generate-datetime-values-from-integers.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -