Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
How to extract timestamp from a date field of format yy-mm-dd hh:mm to have a result only yy-mm-dd
 YoussefBelloum
		
			YoussefBelloum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
so here you want to extract a date from a timestamp ?
try this:
=Date(Floor(your_field))
 
					
				
		
 bhaskar_sm
		
			bhaskar_sm
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You can use Date function with floor and Num function.
Date(floor(num(TimeStampField)),'YY-MM-DD') as Date
Regards,
Bhasker Kumar
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If the field is text, then this will interpret and convert
Date(Floor(Timestamp#(DateField, 'yy-MM-dd hh:mm'), 'yy-MM-dd')
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date(Floor(Timestamp#(YourDate,'YY-MM-DD hh:mm')),'YY-MM-DD')
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
LOAD
 
 BUNKER_DELIVERY_NOTE_NUMBER,
 DENSITY,
 DIFFERENTIAL_REASON,
 FUEL_MASS_AFTER_SOUNDING,
 FUEL_MASS_BEFORE_SOUNDING,
 FUEL_TYPE,
 IMO_NUMBER,
 LOWER_HEATING_VALUE,
 SOUNDING_TIME_TIMEZONE,
 SOUNDING_TIME_UTC,
 SULPHUR_CONTENT,
 TEMPERATURE,
 VISCOSITY,
 WATER_CONTENT
 FROM
mo_purch_sounding_correction_view.qvd
 
 (qvd); 
SOUNDING_TIME_UTC in a view is of format yy-mm-dd hh:mm .I want to extract out the hh:mm and have result in form of only YY-MM-DD:
The field SOUNDING_TIME_UTC is in the form of vsql_varchar
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		SOUNDING_TIME_UTC in a view is of format yy-mm-dd hh:mm .I want to extract out the hh:mm and have result in form of only YY-MM-DD:
The field SOUNDING_TIME_UTC is in the form of vsql_varchar
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		LOAD
BUNKER_DELIVERY_NOTE_NUMBER,
DENSITY,
DIFFERENTIAL_REASON,
FUEL_MASS_AFTER_SOUNDING,
FUEL_MASS_BEFORE_SOUNDING,
FUEL_TYPE,
IMO_NUMBER,
LOWER_HEATING_VALUE,
SOUNDING_TIME_TIMEZONE,
Date(Floor(Timestamp#(SOUNDING_TIME_UTC,'YY-MM-DD hh:mm')),'YY-MM-DD') AS SOUNDING_DATE,
SULPHUR_CONTENT,
TEMPERATURE,
VISCOSITY,
WATER_CONTENT
FROM
mo_purch_sounding_correction_view.qvd
(qvd);
 
					
				
		
 bhaskar_sm
		
			bhaskar_sm
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		SubField(SOUNDING_TIME_UTC ,' ',1) as Date
 
					
				
		
 vishalarote
		
			vishalarote
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
😧
LOAD * INLINE [
Date
10-01-15 10:45
];
load
Date(Date#(date(floor(Timestamp#(Date,'yy-mm-dd hh:mm'))),'dd-mm-yyyy'),'yy-mm-dd') as NDate
Resident D;
