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???
 
					
				
		
 andrei_delta
		
			andrei_delta
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi,
this is the sql command for getting YYYY-MM from current time : convert(varchar(7), getdate(), 126)
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what is the Invoice date format?
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you can try this
Date(monthstart(Date), 'YYYY-MM') as MonthYear
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		YYYY.MM.DD hh:mm:ss
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try
Date(InDate,'YYYY-MM') as YearMonth
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I got error:
'Date' is not a recognized built-in function name.
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		used invoice date only right?
My option is this?
Date(Date#(INVOICEDATE,'YYYY.MM.DD hh:mm:ss'), 'YYYY-MM')
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date(INVOICEDATE,'YYYY-MM') as YearMonth
 
					
				
		
 irmantas
		
			irmantas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Error: 'Date#' is not a recognized built-in function name
