Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Determining DateDiff By Minutes in Hive


Copy link to this message
-
Re: Determining DateDiff By Minutes in Hive
George,
There is a datediff UDF which will tell you the difference between 2 dates.
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions

You can find the number of minutes with simple arithmetic. Keep in mind
that this method would not account for lost (or gained) minutes due to day
light savings time. If that's important, it will be best to convert precise
timestamps to UTC and then subtract them.

Mark

On Wed, Dec 5, 2012 at 12:33 PM, Babe Ruth <[EMAIL PROTECTED]>wrote:

>  Hello All,
>
> I would like to find the total amount of minutes between two dates.  Not
> sure if this is possible in hive.  Any help would be great.
>
>
> Thanks,
> George
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB