Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
ETLCal:
Load *,
Day(New_Date) as tmp_day
Day([To Date]) as tmp_day2,
;
LOAD [Loading Date],
[From Date],
[To Date],
Date#([To Date]) as New_Date,
Status
FROM $(vCalendarPath)
(txt, utf8, embedded labels, delimiter is ',', msq)
// where match(Day([To Date]),28,29,30,31)
;
I am unable to extract day from the date field. I tried typecasting the field and converting it to a set date format but no luck.
Would be really helpful if someone can look at this issue.
I have attached the calendar csv I am using to pull the dates from.
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this?
LOAD [Loading Date],
[From Date],
[To Date],
Day(Date(Date#([To Date], 'M/DD/YYYY'), 'MM/DD/YYYY')) AS Day,
Status
FROM
[..\Desktop\iPowerCalendar.csv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
 
					
				
		
 m_woolf
		
			m_woolf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You need a comma after temp_day and remove the comma after temp_day2
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this?
LOAD [Loading Date],
[From Date],
[To Date],
Day(Date(Date#([To Date], 'M/DD/YYYY'), 'MM/DD/YYYY')) AS Day,
Status
FROM
[..\Desktop\iPowerCalendar.csv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
 
					
				
		
Thanks. This worked
