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
 SSIS and Import/Export (2005)
 DateAdd in SSIS

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-17 : 11:12:39
hi

i have a column of type integer that called CDATE.

i have value like :
6171840
6173280

it's mean the minute from '1988-01-01 00:00:00.0'

i write this expression in DERIVED column:
DATEADD("mi",'1988-01-01 00:00:00.0',CURDATE)

i choose Date type as date[DT_Date] .

and i get a ERROR that he have problem with expression,what is solution?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-04-17 : 11:29:54
shouldnt it be?

DATEADD("mi",CURDATE,'1988-01-01 00:00:00.0')
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-18 : 13:14:06
it should be but it is not like the '1988-01-01 00:00:00.0'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-04-18 : 15:16:02
sorry didnt get that . did you try casting it to date?
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-18 : 15:27:24
thanks i write this:DATEADD("mi",CURDATE,(DT_DATE)"1988-01-01")
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-04-18 : 15:40:33
welcome
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-04-18 : 15:50:02
also see
http://blogs.conchango.com/jamiethomson/archive/2005/03/12/SSIS_3A00_-Datetime-variables-don_2700_t-always-do-what-you-expect.aspx
Go to Top of Page
   

- Advertisement -