April 30, 2012 at 3:29 am
I'm using Derived Column Transformation and I'd like to create column with the current date/time with .000 milliseconds. Can anyone help with the expression I need to perform this please?
Many thanks in advance. Damion
April 30, 2012 at 4:09 am
Pretty simple:
(DT_DBTIMESTAMP2,3)GETDATE()
April 30, 2012 at 4:13 am
Thank you for the quick response.
However, it's returning the actually milliseconds rather than zero (our client software doesn't anything other than zero milliseconds).
2012-04-30 11:11:06.573
April 30, 2012 at 4:19 am
Sorry, misunderstood your requirement. If you set the derived column error output to "Ignore Failure" on truncation then you can use:
(DT_DBTIMESTAMP2,3)(DT_DBTIMESTAMP2,0)GETDATE()
April 30, 2012 at 4:28 am
Thank you very much - worked perfectly!
May 20, 2013 at 3:23 pm
Hey,
Am trying to add an timestamp column by using derived column but i dont want to get the milliseconds. i tried using the expression which is mentioned above but am unable to ignore the failure, it again goes back to "fail component" . can u help me with the expression?
Thanks,
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply