Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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
MVP
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!