From user-return-65847-apmail-spark-user-archive=spark.apache.org@spark.apache.org Mon Dec 5 07:38:13 2016 Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD9B819AC7 for ; Mon, 5 Dec 2016 07:38:13 +0000 (UTC) Received: (qmail 18594 invoked by uid 500); 5 Dec 2016 07:38:09 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 18461 invoked by uid 500); 5 Dec 2016 07:38:09 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 18446 invoked by uid 99); 5 Dec 2016 07:38:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2016 07:38:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C480B180335 for ; Mon, 5 Dec 2016 07:38:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.148 X-Spam-Level: ** X-Spam-Status: No, score=2.148 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 942kc4sppJZ7 for ; Mon, 5 Dec 2016 07:38:08 +0000 (UTC) Received: from mail-yb0-f172.google.com (mail-yb0-f172.google.com [209.85.213.172]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D4FD6618A2 for ; Mon, 5 Dec 2016 07:38:07 +0000 (UTC) Received: by mail-yb0-f172.google.com with SMTP id d128so55324758ybh.2 for ; Sun, 04 Dec 2016 23:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=WqspPz919rH93CauU40Qpefy+74UzwmkE92//41i0Y0=; b=hNiZ+IFAA41AEo8b/lUk3M5Ddee5FbOnTZAW1naTW+rHypWzq9YZghJYcSW973UYrN 5e6AMy10smv/oAvFnHeCN+gmRjXaB9Vbbfnp+6RVKmfrur0xjYn73si0tsU0/BytF6SO xH1tNI2J4430nrkrd68Ix7hzg4e1QLJqTPoNUNURcw+qFAnfSzD9DxkpvRIDDrrjsce9 tHgEbjzx7Uwhpm8ZfsO4u5DaG0JsQml00eO+Y0pU38qzThVLuGVf7xxeAvuEmtWdlAkt XTtUe4WZ7ljiglVf1UFhYzakmtbRCjLEdlIPge61OhD2Hf8EfnOzh1Hj15qPjVfdbZHI /Xuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WqspPz919rH93CauU40Qpefy+74UzwmkE92//41i0Y0=; b=IBHNfyJareGpFT/WUBj3fdv4SXaHXE0dvX8TaoxffvmvLeHZe5kcSjcIY/4IkZERsd X+4oK11vuZd0NiEighBV7qOUNpEy+GKDz0MTTq21JxLIo5Km0WWskTAquJgh+K2VyQPJ Xkv2RbsjuIpM3cYf8Wqx6JXKFeQZMhI4HwJpMZ5qltAmyKUP282Mu3nqwSiLBi5O+kyk lsaVujhjMftJfpHjlr5hnbWtoh9g3oUpNXT/1ObLG4XwYt19qIhVy9YjJ8gF+H0xwdAM hACwwMBxQ77746Kc5GZzXTG3JEh7wOH8C8zAnG47OTIoSyr3ILNrN7E/AaoZZpZIdRp0 xN6g== X-Gm-Message-State: AKaTC03qW+cEW2d8tzMnA6lNc2G0WjZdksZU8CzgsnwL55aQtMvTiV4EL/R2w7nD3ul3YRpd+4E3xVNM9YGHGw== X-Received: by 10.37.27.193 with SMTP id b184mr28005282ybb.96.1480923481378; Sun, 04 Dec 2016 23:38:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.78.139 with HTTP; Sun, 4 Dec 2016 23:38:00 -0800 (PST) From: "Devi P.V" Date: Mon, 5 Dec 2016 13:08:00 +0530 Message-ID: Subject: How to convert a unix timestamp column into date format(yyyy-MM-dd) ? To: "user @spark" Content-Type: multipart/alternative; boundary=001a114278260c14a20542e45ef6 --001a114278260c14a20542e45ef6 Content-Type: text/plain; charset=UTF-8 Hi all, I have a dataframe like following, +------------------------------------+---------------+ |client_id |timestamp| +------------------------------------+---------------+ |cd646551-fceb-4166-acbc-b9|1477989416803 | |3bc61951-0f49-43bf-9848-b2|1477983725292 | |688acc61-753f-4a33-a034-bc|1479899459947 | |5ff1eb6c-14ec-4716-9798-00|1479901374026 | +------------------------------------+---------------+ I want to convert timestamp column into yyyy-MM-dd format. How to do this? Thanks --001a114278260c14a20542e45ef6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I have a datafram= e like following,

+------------------------------------+------------= ---+
|client_id=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |timestamp|
+----------------------------------= --+---------------+
|cd646551-fceb-4166-acbc-b9|1477989416803=C2=A0 ||3bc61951-0f49-43bf-9848-b2|1477983725292=C2=A0 |
|688acc61-753f-4a33-a= 034-bc|1479899459947=C2=A0 |
|5ff1eb6c-14ec-4716-9798-00|1479901374026= =C2=A0 |
+------------------------------------+---------------+

=C2=A0I want to convert timestamp column into yyyy-MM-dd format.
How to do this?


Thanks
--001a114278260c14a20542e45ef6--