The field I have is a timestamp. The date is obviously in wrong order in
the time stamp (I can break it up and reassemble to get a good date, so no
problem there).
I do not seem to be able to get the hour of the day using the date_parts,
so that data seems obscured.
Any ideas how to get the 2 o'clock time out of this field?
*Query...*
select
Datatime_start,
date_part('day',Datatime_Start) `day`,
date_part('month',Datatime_Start) `month`,
date_part('year',Datatime_Start) `year`,
date_part('hour',Datatime_Start) `hour`,
date_part('minute',Datatime_Start) `minute`
from dfs.tmp.tv
limit 5
*Results....*
*Datatime_start*
day
month
year
hour
minute
Datatime_start
day
month
year
hour
minute
28/04/16 2:00 16 4 2028 0 0 28/04/16 2:00 16 4 2028 0 0 28/04/16 2:00 16 4
2028 0 0 28/04/16 2:00 16 4 2028 0 0
--
Joseph Blue
Data Scientist
jblue@maprtech.com | www.mapr.com
*Mobile: 858-357-4926*
|