Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 apthansh
		
			apthansh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have the date format as in attached file.
I ma trying to change the format ,but no results.
Using the below expression -
DATE(DATE#(Date,'MM/DD/YYYY')) as Date
Date(Date, 'YYYY-MM-DD') as Date
any help please.,Thank you
 
					
				
		
 oscar_ortiz
		
			oscar_ortiz
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can try something like this.
Good Luck
Oscar
 apthansh
		
			apthansh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		PFA file ....something is wrong...
 
					
				
		
 oscar_ortiz
		
			oscar_ortiz
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What format is the Date in? MDY or DMY?
 
					
				
		
 oscar_ortiz
		
			oscar_ortiz
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Depending upon which format your original date is you could do something like this.
LOAD
Reference,
Project,
Note,
[Previous Note],
Author,
Date,
Date(Date#(Date, 'M/D/YYYY hh:mm'), 'MM/DD/YYYY') as MDYFmtDate1,
Date(Date#(Date, 'M/D/YYYY hh:mm'), 'YYYY/MM/DD') as YMDFmtDate1,
Date(Date#(Date, 'M/D/YYYY hh:mm'), 'DD/MM/YYYY') as DMYFmtDate1,
Date(Date#(Date, 'D/M/YYYY hh:mm'), 'MM/DD/YYYY') as MDYFmtDate2,
Date(Date#(Date, 'D/M/YYYY hh:mm'), 'YYYY/MM/DD') as YMDFmtDate2,
Date(Date#(Date, 'D/M/YYYY hh:mm'), 'DD/MM/YYYY') as DMYFmtDate2,
[Client name]
FROM
[Date Test (1).csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
Good Luck
Oscar
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		set your timestamp variable format
SET TimestampFormat='M/D/YYYY h:mm';
Now load your csv
Data:
LOAD Reference,
Project,
Note,
[Previous Note],
Author,
Date,
[Client name]
FROM
[Date Test.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
 
					
				
		
 abc_18
		
			abc_18
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try like this
LOAD date(Date#(Date,'MM/DD/YYYY'),'YYYY-MM-DD') as Date
FROM
(txt, codepage is 1252, embedded labels, delimiter is ' ', msq);
 
					
				
		
 dberkesacn
		
			dberkesacn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		