0
ハイブのcurrent_dateから "MMM-yyyy"形式のタイムフォーマットを取得できますか?ハイブの "MMM-yyyy"形式のタイムスタンプが必要
ありがとうございます。例えば
:
col1 col2
12-09-2016 SEP-2016
21-10-2017 OCT-2017
ハイブのcurrent_dateから "MMM-yyyy"形式のタイムフォーマットを取得できますか?ハイブの "MMM-yyyy"形式のタイムスタンプが必要
ありがとうございます。例えば
:
col1 col2
12-09-2016 SEP-2016
21-10-2017 OCT-2017
select from_unixtime(unix_timestamp(CURRENT_DATE, 'yyyy-MM-dd HH:mm:ss'),'MMM-yyyy')
AS currentdate from db.table_name;
例:それは働いた
hive> select from_unixtime(unix_timestamp(CURRENT_DATE, 'yyyy-MM-dd HH:mm:ss'),'MMM-yyyy')
> AS currentdate from default.test limit 1;
OK
Jul-2017
Time taken: 0.043 seconds, Fetched: 1 row(s)
hive>
感謝。 – user3459623