Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I have some dates in an xml file which are in the format d.m.yyyy hh:mm:ss. An example date is 1.6.2015 21:13:54. Now I want to show this date in the default format of my Qlikview document so that I have converted them like this in the Qlikview script
Date#(StartedAt,'dd.mm.yyyy hh:mm:ss') as testdate1,
date(Date#(StartedAt,'dd.mm.yyyy hh:mm:ss')) as testdate2,
This first one is without casting to date, and the second one is to cast it into local document format. However, when I check the document, they don't seem to be converted correctly. For example, please see the attached image

Can someone please tell me how to correct covert them into local document date format
Regards
Shah
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this:
Date(Date#(Trim(StartedAt), 'dd.mm.yyyy hh:mm:ss')) as testdate3,
Date(Floor(Date#(Trim(StartedAt), 'dd.mm.yyyy hh:mm:ss'))) as testdate4
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Here testdate3 will be still have the timestamp, but will only show Date. And testdate4 will only be Date (time floored to 0).
HTH
Best,
Sunny
 
					
				
		
already tried this 
Date#(trim(StartedAt),'dd.mm.yyyy hh:mm:ss') as testdate1,
date(Date#(trim(StartedAt),'dd.mm.yyyy h:m:s')) as testdate2,
 
					
				
		
The problem is that I need to convert them to default document timestamp without flooring the time part as I need it in timestamp format of the document default
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What I suggested is different 
Your:
Date#(trim(StartedAt),'dd.mm.yyyy hh:mm:ss') as testdate1,
date(Date#(trim(StartedAt),'dd.mm.yyyy h:m:s')) as testdate2,
vs. Mine:
Date(Date#(Trim(StartedAt), 'dd.mm.yyyy hh:mm:ss')) as testdate3,
Date(Floor(Date#(Trim(StartedAt), 'dd.mm.yyyy hh:mm:ss'))) as testdate4
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this:
TimeStamp(TimeStamp#(Trim(StartedAt), 'dd.mm.yyyy hh:mm:ss')) as testdate5,
 
					
				
		
In any case, it is still returning the same result even after flooring the time part as you suggested. I already tried trimming the string
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try' DD.MM.YYYY hh:mm:ss'
mm is minutes
MM is Month
 
					
				
		
yup, still no difference in the result 
