Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. 3/3/2008 15:21:33
  2.  
  3. 2008-03-03 15:21:33.000
  4.  
  5. Data conversion failed. The data conversion for column "TIME_STAMP"
  6. returned status value 2 and status text "The value could not be
  7. converted because of a potential loss of data.
  8.  
  9. (LEN(TRIM(TIME_STAMP)) < 23) || (TRIM(TIME_STAMP) == "")
  10. || (ISNULL(TIME_STAMP)) ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)TIME_STAMP
  11.  
  12. (DT_WSTR, 23)
  13. (
  14. (LEN(TRIM(TIME_STAMP )) < 17) || (TRIM(TIME_STAMP ) == "")
  15. || (ISNULL(TIME_STAMP )) ? NULL(DT_DBTIMESTAMP2, 3) : (DT_DBTIMESTAMP2, 3)
  16. (DT_DATE)TIME_STAMP
  17. )
  18.  
  19. /// <summary>
  20. /// This method is called once for every row that passes through the component from Input0.
  21. ///
  22. /// Example of reading a value from a column in the the row:
  23. /// string zipCode = Row.ZipCode
  24. ///
  25. /// Example of writing a value to a column in the row:
  26. /// Row.ZipCode = zipCode
  27. /// </summary>
  28. /// <param name="Row">The row that is currently passing through the component</param>
  29. public override void Input0_ProcessInputRow(Input0Buffer Row)
  30. {
  31. if (!Row.DerivedColumn1_IsNull)
  32. {
  33. DateTime dt;
  34.  
  35. if (DateTime.TryParse(Row.DerivedColumn1, out dt))
  36. {
  37. Row.DerivedColumn1 = dt.ToString("yyyy-MM-dd HH:mm:ss.fff");
  38. }
  39. else
  40. {
  41. Row.DerivedColumn1_IsNull = true;
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement