Assign a date derived Column
Hello , I have an issue with derived column.I have defined a column called file_date in derived column.I want to assign a date for that particular column.The date would be yesterday's date.I have written an expression ==DATEADD(d,-1,getdate()) like this.But it is not parsing..It is showing an error..Please help me with this.I tried putting double quotes and single quotes..But no use....its very urgent...thanks...
November 16th, 2011 9:42am

Use the below expression in derived column: You may need to truncate time portion if you only need just date and time as "00:00:000" DATEADD("day",-1,GETDATE())
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2011 9:49am

you are missing "" try this DATEADD("D",-1,GETDATE()) Shailesh, Please mark the post as answered if it answers your question.
November 16th, 2011 9:53am

Thanks a lot deepak.It worked :)...But I dont want the time...I just want the date...In my data conversion transformation I have given the data type for file_date as date..But even then I am getting time...How to get rid of time part?...Thanks again for your time..
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2011 9:56am

Thanks Shailesh...That was exactly my mistake...I am good to go now...:).. @Deepak...I have resolved the time part...I am good to go.. Thanks for your time...
November 16th, 2011 10:02am

Use the below expression in derived column: You may need to truncate time portion if you only need just date and time as "00:00:000" DATEADD("day",-1,GETDATE())
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2011 5:43pm

Thanks Shailesh...That was exactly my mistake...I am good to go now...:).. @Deepak...I have resolved the time part...I am good to go.. Thanks for your time...
November 16th, 2011 5:56pm

Hi, refer to this thread which analyses the date format issue with SSIS http://beyondrelational.com/ask/sudeep/questions/12/data-format-issue-while-importing-data-from-excel-to-sql-server-using-ssis.aspxThanks Karthikeyan Anbarasan http://f5debug.net/
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2011 4:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics