org.apache.hadoop.hive.ql.udf
Class UDFMonth
java.lang.Object
org.apache.hadoop.hive.ql.exec.UDF
org.apache.hadoop.hive.ql.udf.UDFMonth
public class UDFMonth
- extends UDF
UDFMonth.
UDFMonth
public UDFMonth()
evaluate
public org.apache.hadoop.io.IntWritable evaluate(org.apache.hadoop.io.Text dateString)
- Get the month from a date string.
- Parameters:
dateString
- the dateString in the format of "yyyy-MM-dd HH:mm:ss" or
"yyyy-MM-dd".
- Returns:
- an int from 1 to 12. null if the dateString is not a valid date
string.
evaluate
public org.apache.hadoop.io.IntWritable evaluate(DateWritable d)
evaluate
public org.apache.hadoop.io.IntWritable evaluate(TimestampWritable t)
Copyright © 2014 The Apache Software Foundation. All rights reserved.