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 2008 Forums
 SSIS and Import/Export (2008)
 Get difference between two datetime fields in SSIS

Author  Topic 

JaniceD
Starting Member

1 Post

Posted - 2012-10-19 : 06:51:15
I wan to calculate difference between two datetime fields in minutes; I am using below expression in SSIS;

DATEDIFF("Mi",[Email_Time],End_Time)
but this is returning integer values but i want diffence to be considered in decimal as well.

e.g if Email Time= 4/2/2012 2:54:00 PM
and End Time=4/2/2012 3:17:22 PM
then i want return values to be 23.22


Is there any way through which we can achieve this if datediff is not the solution

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-19 : 22:56:52
DATEDIFF("ss",[Email_Time],End_Time)/60.0

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

Go to Top of Page
   

- Advertisement -