- Apache Pig 教程
- Apache Pig - 首頁
- Apache Pig 簡介
- Apache Pig - 概述
- Apache Pig - 架構
- Apache Pig 環境
- Apache Pig - 安裝
- Apache Pig - 執行
- Apache Pig - Grunt Shell
- Pig Latin
- Pig Latin - 基礎
- 載入 & 儲存運算子
- Apache Pig - 讀取資料
- Apache Pig - 儲存資料
- 診斷運算子
- Apache Pig - 診斷運算子
- Apache Pig - Describe 運算子
- Apache Pig - Explain 運算子
- Apache Pig - Illustrate 運算子
- 分組 & 連線
- Apache Pig - Group 運算子
- Apache Pig - Cogroup 運算子
- Apache Pig - Join 運算子
- Apache Pig - Cross 運算子
- Pig Latin 內建函式
- Apache Pig - Eval 函式
- 載入 & 儲存函式
- Apache Pig - Bag & Tuple 函式
- Apache Pig - 字串函式
- Apache Pig - 日期時間函式
- Apache Pig - 數學函式
- Apache Pig 有用資源
- Apache Pig - 快速指南
- Apache Pig - 有用資源
- Apache Pig - 討論
Apache Pig - 日期時間函式
Apache Pig 提供以下日期和時間函式:
| 序號 | 函式 & 描述 |
|---|---|
| 1 | ToDate(milliseconds)
此函式根據給定的引數返回一個日期時間物件。此函式的其他替代方案為 ToDate(iosstring)、ToDate(userstring, format)、ToDate(userstring, format, timezone) |
| 2 | CurrentTime()
返回當前時間的日期時間物件。 |
| 3 | GetDay(datetime)
從日期時間物件中返回月份中的某一天。 |
| 4 | GetHour(datetime)
從日期時間物件中返回一天中的小時。 |
| 5 | GetMilliSecond(datetime)
從日期時間物件中返回一秒鐘中的毫秒數。 |
| 6 | GetMinute(datetime)
從日期時間物件中返回一小時中的分鐘數。 |
| 7 | GetMonth(datetime)
從日期時間物件中返回一年中的月份。 |
| 8 | GetSecond(datetime)
從日期時間物件中返回一分鐘中的秒數。 |
| 9 | GetWeek(datetime)
從日期時間物件中返回一年中的星期數。 |
| 10 | GetWeekYear(datetime)
從日期時間物件中返回星期年。 |
| 11 | GetYear(datetime)
從日期時間物件中返回年份。 |
| 12 | AddDuration(datetime, duration)
返回日期時間物件加上持續時間物件的計算結果。 |
| 13 | SubtractDuration(datetime, duration)
從日期時間物件中減去持續時間物件並返回結果。 |
| 14 | DaysBetween(datetime1, datetime2)
返回兩個日期時間物件之間的天數。 |
| 15 | HoursBetween(datetime1, datetime2)
返回兩個日期時間物件之間的小時數。 |
| 16 | MilliSecondsBetween(datetime1, datetime2)
返回兩個日期時間物件之間的毫秒數。 |
| 17 | MinutesBetween(datetime1, datetime2)
返回兩個日期時間物件之間的分鐘數。 |
| 18 | MonthsBetween(datetime1, datetime2)
返回兩個日期時間物件之間的月數。 |
| 19 | SecondsBetween(datetime1, datetime2)
返回兩個日期時間物件之間的秒數。 |
| 20 | WeeksBetween(datetime1, datetime2)
返回兩個日期時間物件之間的週數。 |
| 21 | YearsBetween(datetime1, datetime2)
返回兩個日期時間物件之間的年數。 |
廣告