hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/LanguageManual/UDF" by hliu
Date Wed, 25 Mar 2009 01:45:27 GMT
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:

  === 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||

View raw message