Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E86C10D97 for ; Tue, 24 Dec 2013 07:18:32 +0000 (UTC) Received: (qmail 7516 invoked by uid 500); 24 Dec 2013 07:18:22 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 7453 invoked by uid 500); 24 Dec 2013 07:18:20 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 7444 invoked by uid 99); 24 Dec 2013 07:18:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Dec 2013 07:18:18 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [203.91.198.75] (HELO wipro-blr-out02.wipro.com) (203.91.198.75) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Dec 2013 07:18:12 +0000 X-AuditID: cb5bdd58-b7f598e000002d62-5a-52b9351d54de Received: from BLR-OUT-EDG01.wipro.com ( [203.91.193.31]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by wipro-blr-out02.wipro.com (Symantec Mail Security) with SMTP id 5F.BF.11618.D1539B25; Tue, 24 Dec 2013 12:47:49 +0530 (IST) Received: from BLR-EC-MBX7.wipro.com (10.208.51.117) by BLR-OUT-EDG01.wipro.com (203.91.193.31) with Microsoft SMTP Server (TLS) id 14.3.169.1; Tue, 24 Dec 2013 12:47:36 +0530 Received: from BLR-SJP-MBX-14.wipro.com (10.102.50.154) by BLR-EC-MBX7.wipro.com (10.208.51.117) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 24 Dec 2013 12:47:41 +0530 Received: from BLR-SJP-MBX-6.wipro.com ([169.254.5.9]) by BLR-SJP-MBX-14.wipro.com ([169.254.10.175]) with mapi id 14.03.0158.001; Tue, 24 Dec 2013 12:47:40 +0530 From: To: Subject: RE: Date format in Hive Thread-Topic: Date format in Hive Thread-Index: AQHPAHUVrySoGhyEnUunmt7XnUUrxppi7ptG Date: Tue, 24 Dec 2013 07:17:40 +0000 Message-ID: <765C20A3B9276145875E35CED1AED0473CD9D7E0@BLR-SJP-MBX-6.wipro.com> References: In-Reply-To: Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.208.50.22] Content-Type: text/plain; charset="us-ascii" content-transfer-encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA3VTbUgTYRzn2c3zZrs4V+bT6OV2YIG10Jmm1UZERX0pW4G9fNBzu7bD7e66 u5kGkb0ZrdablXMVvlRSQfiSiJIUGRVqkZESSUmhWU4k7Wsg3e3ShOg+/Z7/7/f7v9zzfzDE FEXNGMvJjMjRPgpN0Pfsf7rUujiz3Zn29lhO9qnQCLoBbK38VQdywb4ysJ7mOF6mZYZ0M5LL TuWxgsiTm1jJ5aNZPyNSJOu2UzaKFHy0i/EznGynaEFgODflSCD/+dYrMpYjGc7Fu1nOY6e2 7dphzc7OzLGmU47dXoZkuQO86KdlludIF8/JBX1G74OJECpcRkvuTW4sA0P6IDBgkFgNv7Y3 xWl4AewdbECDIAEzEZU6+OFLI6oSJuIhgJFeWiNaAOxref5HVQ/grWi1TlWhxGIYfHwnlmo+ YYYNz74iKp5HkHAs/BnR4hbYFDoTr2EbDD15GfPqiRTYOj6uYAzDie2w6mSuVjgX9r9vBio2 EDvht/BUTAKUUtfDsTBCJMOBYa0DSBDwdscbRMNJcHRo6s9gJGws/4Fo+pWw5tFPVMMrYH3t WCyOE4mwq2pYr5Wl4OnaifiLytSzSkRm2SOz7JFZ9hqgvw8WHlIv11roE618QE6zrYqdV7l4 fzOILcqnPW3g+gVHJyAwQBlxIdDmNMXRxVKpvxMsxHRUEl6e0e40zS3k3aVeWvLmiwEfI3UC iCHUfLzPonC4my49zIj8NLVZ+YeXEPMc9a6V5cnPSEv7/4FKxm3rrjpNhEdZyCKGERhxOs8i DKMgfkUtnygyHqbkAOuT/9I6zKC2YVTaOGlT25AE2i+xHo3vBhZzMh5RzYRKeAPcjHf6iURB sjL0PLxDVRmVBzTjjiqJdUri4+FWNbHyWGYocxnYzP3wlIyshUXF9NSJ0nf363ZumSiQj11G eu5WVD+dvF2Z46zoPb8uPmS5aqnNDB/hXz6pMAVvBEBKVrN7m6C/tj1hbyQqGs7GLV1+c053 7ZolvVkfzY7X9EB/Vg1ujd9TfG7X0S1D5fsM1kHDxVej34crw105eYWTB3X+ZS9qUim95KXT UxFRon8D+CQtU/0DAAA= X-Virus-Checked: Checked by ClamAV on apache.org Hello Dhari, Write a hive udf, 1.which ll take date as argument. 2.extract yr, mon,date from string, create a new string combining them 3. convert it to numeric and multiply 100.. 4. return this value from udf. Thanks, Ashok ________________________________________ From: yogesh dhari [yogeshhive@gmail.com] Sent: Tuesday, December 24, 2013 12:24 PM To: user@hive.apache.org Subject: Date format in Hive Hello All, I have a hive table in which dates are stored in string format. like 2013-01-01 2013-02-01 2013-03-01 I have a use case where I need this date like 20130101 20130201 20130301 and want to multiply each with 100 like 2013010100 2013020100 2013030100 How can I do it into Hive pls help. Thanks & Regards Yogesh The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may= contain proprietary, confidential or privileged information. If you are not= the intended recipient, you should not disseminate, distribute or copy this= e-mail. Please notify the sender immediately and destroy all copies of this= message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should= check this email and any attachments for the presence of viruses. The compa= ny accepts no liability for any damage caused by any virus transmitted by th= is email. www.wipro.com