Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
I have ID, Field1 (Date1) and Field2 (Date2).
When i try to do Field2-Field1, the result is in decimals.
I was wondering why, as i never faced this issue and the fields were in Date format but not Timestamp.
Can someone help. Pls find attachment.
 
					
				
		
Also Date() just formats it, you need the floor() to remove the timestamp decimals.
 
					
				
		
Your fields are timestamps, so you need to floor() them by using an expression like this :
floor(Field2)-floor(Field1)
 Clever_Anjos
		
			Clever_Anjos
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Your Field1 is a timestamp formatted as date, please check your excel file
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes sir. But i have converted it to Date using Date(Filed1) and Date(Filed2) function.
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is it because the timestamp still present?
 
					
				
		
Not in the load script of the qvw you posted :
Directory;
LOAD ID,
Field1,
Field2
FROM
tets.xlsx
(ooxml, embedded labels, table is Sheet1);
 
					
				
		
Also Date() just formats it, you need the floor() to remove the timestamp decimals.
 
					
				
		
 markgraham123
		
			markgraham123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I got it now. 
Thanq Bill 
 Clever_Anjos
		
			Clever_Anjos
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date() does not convert, only formats
Date(Floor()) does what you need
