课程表

Apache Pig 基础

Apache Pig 诊断运算符

Apache Pig 分组和连接

Apache Pig 合并和拆分

Apache Pig 过滤

Apache Pig 排序

Pig Latin 内置函数

Apache Pig 其他执行模式

工具箱
速查手册

Apache Pig 日期时间函数

当前位置:免费教程 » 大数据/云 » Apache Pig

Apache Pig提供以下日期和时间函数 -

S.N.函数 & 描述
1ToDate(milliseconds)

此函数根据给定的参数返回日期时间对象。此函数的另一个替代方法是ToDate(iosstring),ToDate(userstring,format),ToDate(userstring,format,timezone)

2CurrentTime()

返回当前时间的日期时间对象。

3GetDay(datetime)

从日期时间对象返回一个月中的某一天。

4GetHour(datetime)

从日期时间对象返回一天中的小时。

5GetMilliSecond(datetime)

从日期时间对象返回秒中的毫秒。

6GetMinute(datetime)

从日期时间对象返回一小时中的分钟。

7GetMonth(datetime)

从日期时间对象返回一年中的月份。

8GetSecond(datetime)

从日期时间对象返回一分钟的秒。

9GetWeek(datetime)

从日期时间对象返回一年中的周。

10GetWeekYear(datetime)

从日期时间对象返回周年。

11GetYear(datetime)

从日期时间对象返回年份。

12AddDuration(datetime, duration)

返回日期时间对象的结果以及持续时间对象。

13SubtractDuration(datetime, duration)

从Date-Time对象中减去Duration对象并返回结果。

14DaysBetween(datetime1, datetime2)

返回两个日期时间对象之间的天数。

15HoursBetween(datetime1, datetime2)

返回两个日期时间对象之间的小时数。

16MilliSecondsBetween(datetime1, datetime2)

返回两个日期时间对象之间的毫秒数。

17MinutesBetween(datetime1, datetime2)

返回两个日期时间对象之间的分钟数。

18MonthsBetween(datetime1, datetime2)

返回两个日期时间对象之间的月数。

19SecondsBetween(datetime1, datetime2)

返回两个日期时间对象之间的秒数。

20WeeksBetween(datetime1, datetime2)

返回两个日期时间对象之间的周数。

21YearsBetween(datetime1, datetime2)

返回两个日期时间对象之间的年数。

转载本站内容时,请务必注明来自W3xue,违者必究。
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号