Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The following page has been changed by hliu: http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF ------------------------------------------------------------------------------ === Date Functions === The following built-in date functions are supported in hive: ||string ||from_unixtime(int unixtime) ||convert the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the format of "1970-01-01 00:00:00"|| + ||bigint ||unix_timestamp() || Get current time stamp. It will use the default time zone.|| + ||bigint ||unix_timestamp(string date) || Convert time string in format yyyy-MM-dd \H\H:mm:ss to Unix time stamp, return 0 if fail: unix_timestamp('2009-03-20 11:30:01') = 1237573801|| + ||bigint ||unix_timestamp(string date, string pattern) || Convert time string with given pattern (java date and time pattern) to Unix time stamp, return 0 if fail: unix_timestamp('2009-03-20', 'yyyy-MM-dd') = 1237532400 || ||string ||to_date(string timestamp) ||Return the date part of a timestamp string: to_date("1970-01-01 00:00:00") = "1970-01-01"|| ||int ||year(string date) ||Return the year part of a date or a timestamp string: year("1970-01-01 00:00:00") = 1970, year("1970-01-01") = 1970|| ||int ||month(string date) ||Return the month part of a date or a timestamp string: month("1970-11-01 00:00:00") = 11, month("1970-11-01") = 11||
