Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
Could you please resolve this issue..
in my dashboard i have the date feild data like this Tue-06-2016 01.52.10 AM
am unable to extract from this date to years or months any another extraction
It would be appreciate if it solved ASAP
written expression as : Year(Date field)
Month(Date Field)
Thanks
Sonysree
Hi sonygot,
You can try this below way,
Date(Date Field,'DD/MM/YYYY')
Hi Ghosh,
Tried it not working..data is coming from hive
try this
Year(date#(trim(mid(Field,index(Field,'-',1),index(Field,' ',1))),'MM-YYYY')) as Year
month(date#(trim(mid(Field,index(Field,'-',1),index(Field,' ',1))),'MM-YYYY')) as Month
maybe like this
load *,
month(date) as month,
year(date) as year;
timestamp(timestamp#(mid('Tue-06-2016 01.52.10 AM',5),'MM-YYYY hh.mm.ss TT'),'MMM/DD/YYYY') as date
Tried it not working am unable to extract something from date
How can i get the weeks from date filed
I am using like weekday(Date filed)
Try
Month(Date#('01'&PurgeChar(DateField,SubField(DateField,'-',1)),'DD-MM-YYYY hh.mm.ss tt'))
Hi,
Date(floor(Date_Field))
Year(Date(floor(Date_Field)))
Month(Date(floor(Date_Field)))
can you post sample data
Hi,
Can you give me sample qvw file?
You can use Week(Date_Field).