使用SSIS将DateTime列转换为Unix Epoch Timestamp
我有一个来自CSV存储日期时间的列。我需要能够在该DateTime字段的几秒钟内进行一些简单的计算。我想知道如何使用派生列将DateTime字段转换为Unix Epoch时间戳。
在SQL中,我通常会做这样的事情:
DATEDIFF(second,{d '1970-01-01'},myDateTime)
这给了我整数值。
但是,我在SSIS中尝试过同样的尝试并获得错误,为什么这不能正确解析?
I have a column from a CSV that stores datetime. I need to be able to do some simple calculations on the seconds of that datetime field. I want to know how I can convert the datetime field into the UNIX epoch timestamp using a derived column.
In SQL I would usually just do something like this:
DATEDIFF(second,{d '1970-01-01'},myDateTime)
Which gives me the integer value.
However I've tried the same in SSIS and get errors, why is this not correctly parsing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Have you had a look at the SSIS documentation online for
Have you had a look at the SSIS documentation online for datediff? There tends to be usable examples in those docs.