外部表格-日期格式YYYY-MM-DDThh:mm:ss [.nnnnnnn] Z [英] External Table - date format YYYY-MM-DDThh:mm:ss[.nnnnnnn]Z

查看:115
本文介绍了外部表格-日期格式YYYY-MM-DDThh:mm:ss [.nnnnnnn] Z的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在具有datetime列的文件上创建外部表,但遇到了问题.日期时间格式为

YYYY-MM- DDThh:mm:ss [.nnnnnnn] Z,我找不到任何日期时间列格式来处理该信息.

使用datetime2(7 )出现以下错误:

预期的数据类型:DATETIME2(3),违规值:2018-06-02T19:00:00.000Z (列转换错误),错误:将NVARCHAR值'2018-06-02T19:00:00.000Z'转换为数据类型DATETIME2时转换失败.

有人知道吗要使用的数据类型?最好不使用varchar:-)

最诚挚的问候

/Carl


最美好的祝愿/卡尔

解决方案

您好剑,

请查看: T 此处是所有可能的日期/时间格式的一部分.如果找不到您,请告诉我 寻找.

此致

迈克


Hi,

I'm trying to create an external table over a file with a datetime column but have bumped into an issue. The datetime format is 

YYYY-MM-DDThh:mm:ss[.nnnnnnn]Z and I can't find any datetime column format to handle the information. 

Using datetime2 (7) I get the following error:

Expected data type: DATETIME2(3), Offending value: 2018-06-02T19:00:00.000Z  (Column Conversion Error), Error: Conversion failed when converting the NVARCHAR value '2018-06-02T19:00:00.000Z' to data type DATETIME2. 

Does anyone know what data type to use? Preferably without using varchar :-)

best regards

/Carl


best wishes /Carl

解决方案

Hi theSword,

Please take a look at: CREATE EXTERNAL FILE FORMAT (Transact-SQL)

There is a section on all the possible date/time formats. Please let me know if you don't find what you are looking for.

Regards,

Mike


这篇关于外部表格-日期格式YYYY-MM-DDThh:mm:ss [.nnnnnnn] Z的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆