You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2011/05/18 01:29:18 UTC

[Hadoop Wiki] Trivial Update of "Hive/LanguageManual/UDF" by StevenWong

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/UDF" page has been changed by StevenWong.
The comment on this change is: Fix parameter type..
http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF?action=diff&rev1=65&rev2=66

--------------------------------------------------

  
  === Date Functions ===
  The following built-in date functions are supported in hive:
- ||string ||from_unixtime(int unixtime) ||Converts 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" ||
+ ||string ||from_unixtime(bigint unixtime) ||Converts 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() ||Gets current time stamp using the default time zone. ||
  ||bigint ||unix_timestamp(string date) ||Converts time string in format `yyyy-MM-dd HH: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 (see [[[http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html]]]) to Unix time stamp, return 0 if fail: unix_timestamp('2009-03-20', 'yyyy-MM-dd') = 1237532400 ||