Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello all,
From SQL I am loading data like this :
Year(INVOICEDATE) as Year,
Month(INVOICEDATE) as Month,
Day(INVOICEDATE) as Day,
But i need load field like this : YYYY-MM
I was try :Year(INVOICEDATE)&'-'& Month(INVOICEDATE) as YearMonth,
But result is 0
Is it posable???
Which version of QV you are with? And where you are trying? Can you show image atleast
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		My QV version 12.0
I need dimension for filtering 'Year-Month'
My load script is:

Date# functions works only QV not for SQL, Anyway, Can you try this?
ODBC..
Load *, Date(Date#(....));
SQL SELECT * FROM ..;
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You mean:

But result is BLANK
Give, Between space from Load and * like
Load *, Date....
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The same, no data in YearMonth field.
Image please for DateField?
 
					
				
		
 andrei_delta
		
			andrei_delta
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi,
this is the sql command for getting YYYY-MM from current time : convert(varchar(7), getdate(), 126)
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Working:
convert(varchar(7), INVOICEDATE, 126) as YearMonth,
Thank you
