org.apache.hadoop.hive.ql.udf
Class UDFYear
java.lang.Object
org.apache.hadoop.hive.ql.exec.UDF
org.apache.hadoop.hive.ql.udf.UDFYear
public class UDFYear
- extends UDF
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDFYear
public UDFYear()
evaluate
public Integer evaluate(String dateString)
- Get the year 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.
Copyright © 2009 The Apache Software Foundation