Vertica 转换日期格式 [英] Vertica convert date format

查看:85
本文介绍了Vertica 转换日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSSQL中,我们可以将日期格式转换为我们想要的格式.

In MSSQL we can convert the date format into the format we wanted.

convert(char(10),column_name , 120)

在 vertica 数据库中我们可以做同样的事情吗?

in vertica database can we do the same?

SELECT CONVERT(CHAR(10),CURRENT_TIMESTAMP,120)

推荐答案

也许是这样的?

select current_timestamp::varchar ;

还是这个?

select left(current_timestamp::varchar, 10) ;

查看 数据类型强制部分和数据类型转换中的标准文档可能有帮助...

A look to the Data Type Coercion section and the Data Type Coercion Chart in the standard documentation would probably help...

这篇关于Vertica 转换日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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