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)
 GETDATE() in expression

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-10-28 : 04:04:40
when i write GETDATE()in expression i get this error

"TITLE: Expression Builder
------------------------------

Cannot convert expression value to property type.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2008&ProdVer=9.0.30729.1&EvtSrc=Microsoft.DataTransformationServices.Controls.TaskUIFramework.TaskUIFrameworkSR&EvtID=CannotAssignExpressionToProperty&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Cannot convert 'System.DateTime' to 'System.String'.

------------------------------
BUTTONS:

OK
------------------------------

i want to get in this format(that include time) yyyy-mm-dd hh:nn:ss

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-28 : 10:42:31
see Here
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-10-28 : 11:18:23
it is not hwlp,i use ssis
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-28 : 12:37:33
you're going to need to explicitly convert it. if it's in a data transformation task, go into the mapping tab and change the output data type.

if it's a t-sql task, then you need to explicitly convert it, which is what the link i provided shows.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-10-28 : 12:53:12
what are you actually trying to accomplish...what is the end product suppose to be?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx





Go to Top of Page
   

- Advertisement -