incubator-drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Scott <jsc...@maprtech.com>
Subject date formats and date parsing
Date Fri, 01 Aug 2014 22:27:22 GMT
I am trying to figure out how to parse date fields. The first question,
which formatting for interpreting dates should be used? e.g. java date time
format,
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Is this the proper format that should be used to parse a field into a date?
to_date(FIELD, "FORMAT PATTERN")

​Lastly, there needs to be some more clarification around how to use these
functions:
date_add(date,interval expr type)date/datetimedate_part(text, timestamp) double
precisiondate_part(text, interval)double precisiondate_sub(date,INTERVAL
expr type) date/datetimeextract(field from interval)double
precisionextract(field
from timestamp) double precision​

​date_add(date, "what is an interval expression type?")
What exactly does date_part do? if text is supposed to one of ​
​DAY,DAYOFWEEK,YEAR, etc... what is interval or timestamp? Should those
actually be date's?
​
​
Basically, I think some clarification around "field", "interval", "text"
actually mean in these cases would be VERY helpful.​


-- 
*Jim Scott*
Director, Enterprise Strategy & Architecture

 <http://www.mapr.com/>
[image: MapR Technologies] <http://www.mapr.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message