Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 sonysree88
		
			sonysree88
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 susovan
		
			susovan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi sonygot,
You can try this below way,
Date(Date Field,'DD/MM/YYYY')
 sonysree88
		
			sonysree88
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Ghosh,
Tried it not working..data is coming from hive
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 sonysree88
		
			sonysree88
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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)
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
Month(Date#('01'&PurgeChar(DateField,SubField(DateField,'-',1)),'DD-MM-YYYY hh.mm.ss tt'))
 muthukumar77
		
			muthukumar77
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Date(floor(Date_Field))
Year(Date(floor(Date_Field)))
Month(Date(floor(Date_Field)))
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		can you post sample data
 muthukumar77
		
			muthukumar77
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Can you give me sample qvw file?
You can use Week(Date_Field).
