Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
I'm trying to remove the seconds part in my timestamps fields and of course keeping this fields in timestamp format.
I tried the following:
TEMP:
LOAD
	SourceID,
	ObjectID,
    [Start Time],
Timestamp(timestamp#(left([Start Time], 16), 'MM.DD.YYYY hh:mm')) as 'Start Time Test',
    [End Time],
Timestamp(timestamp#(left([End Time], 16), 'MM.DD.YYYY hh:mm')) as 'End Time Test'
Inline [
SourceID, ObjectID, Start Time, End Time
1, 12345, 28/02/2019 16:00:50, 28/02/2019 16:05:00
2, 67890, 01/03/2019 23:59:45, 02/03/2019 0:02:20
];and can't get it to work :
please tell me how can I overcome it.
Thanks!
Eli
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		With expression:
Date(Date#([Start Time], 'DD/MM/YYYY hh:mm:ss'), 'DD/MM/YYYY hh:mm') as [Start Time Test]
you are not actually removing the seconds from the timestamp, but hiding them. That way, your app size would not reduce, if you don't need this seconds details in UI, you should remove them using floor() as I showed above. Try:
Date(Floor(Date#([Start Time],'DD/MM/YYYY hh:mm:ss'),1/24/60),'DD/MM/YYYY hh:mm')
as [Start Time Test]
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Perhaps this way?
Date(Date#([Start Time], 'DD/MM/YYYY hh:mm:ss'), 'DD/MM/YYYY hh:mm') as [Start Time Test]
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		For removing seconds from timestamp, you should use floor() with step, like:
Timestamp(Floor([Start Time],1/24/60)) as as TimeWithoutSec
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		With expression:
Date(Date#([Start Time], 'DD/MM/YYYY hh:mm:ss'), 'DD/MM/YYYY hh:mm') as [Start Time Test]
you are not actually removing the seconds from the timestamp, but hiding them. That way, your app size would not reduce, if you don't need this seconds details in UI, you should remove them using floor() as I showed above. Try:
Date(Floor(Date#([Start Time],'DD/MM/YYYY hh:mm:ss'),1/24/60),'DD/MM/YYYY hh:mm')
as [Start Time Test]
 EliGohar
		
			EliGohar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		