Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Datepart

Hi

What am I doing wrong here???

I'm trying to create a YearMonthName field. First 2 work ok, but the 3rd one does not. Can someone help.

Thanks

 

DatePart(month, search_Incident_Custom_Joined.DateRaised) as Month,
DatePart(year, search_Incident_Custom_Joined.DateRaised) as Year,
DatePart(year,search_Incident_Custom_Joined.DateRaised) & DatePart(Month,search_Incident_Custom_Joined.DateRaised) as YearMonthName

5 Replies
Gysbert_Wassenaar

Datepart is not a qlikview function. If you want help with regards to the SQL Server T-SQL dialect I recommend you ask on a forum that specializes in T-SQL


talk is cheap, supply exceeds demand
Not applicable
Author

how come these work ok and the other one doesn't?

DatePart(month, search_Incident_Custom_Joined.DateRaised) as Month,

DatePart(year, search_Incident_Custom_Joined.DateRaised) as Year,

Gysbert_Wassenaar

Ah, let me try that again :

Datepart is not a qlikview function. If you want help with regards to the SQL Server T-SQL dialect I recommend you ask on a forum that specializes in T-SQL


talk is cheap, supply exceeds demand
Not applicable
Author

As I'm posting in the NEW to QlikView forum perhaps you could be a little bit forgiving!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can create those fields using below script.

Load *,

Month(DateRaised) as Month,
Year(DateRaised) as Year,
Monthname(DateRaised) & MonthYear;

Sql Select * from  search_Incident_Custom_Joined;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!