Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 480AF200AC8 for ; Tue, 7 Jun 2016 14:23:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4507F160A36; Tue, 7 Jun 2016 12:23:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B3334160A35 for ; Tue, 7 Jun 2016 14:23:10 +0200 (CEST) Received: (qmail 91116 invoked by uid 500); 7 Jun 2016 12:23:09 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 91105 invoked by uid 99); 7 Jun 2016 12:23:09 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2016 12:23:09 +0000 Received: from [192.168.178.32] (p508CFC72.dip0.t-ipconnect.de [80.140.252.114]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 3CE4B1A015B for ; Tue, 7 Jun 2016 12:23:08 +0000 (UTC) From: "Till Westmann" To: dev@asterixdb.apache.org Subject: Re: Datetime to Unix Timestamp Date: Tue, 07 Jun 2016 14:23:14 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: MailMate (1.9.4r5234) archived-at: Tue, 07 Jun 2016 12:23:11 -0000 I think that it’s fine to add a function for this. However, AFAIK the UNIX timestamp is in seconds [1], so it seems that we don’t need functions for different time units. Is there a reason why we should support different time units? Cheers, Till [1] https://en.wikipedia.org/wiki/Unix_time On 6 Jun 2016, at 3:08, Ian Maxon wrote: > I don't think so. The other way around (timestamp to datetime) only existed > until relatively recently. I never made the other way around, or at least I > don't recall doing it. > > On Sun, Jun 5, 2016 at 3:03 PM, Preston Carman wrote: > >> Is there a way to get the Unix timestamp of a datetime value? The data >> is stored in this way. We have several functions to take a UNIX >> timestamp and create an AsterixDB datetime value, but do we have the >> other way around? >> >> Possible functions >> UNIX_TIME_FROM_DATETIME_IN_MS >> UNIX_TIME_FROM_DATETIME_IN_SECS >> >> Thoughts on adding these functions? >> >> Just wanted to check to see if I was missing the way method to get a >> Unix timestamp or it was actually missing. >> >> Thanks >> Preston >>