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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
niha
Creator II
Creator II

Year and Month function coming blank in Date Filed

Hello,

I am new to QlikSense. I loaded CSV files from MarkLogic. There is only one CSV file in data model . I wanted to do a  Preceding Load . I wanted to see Year , Month of [Date Paid ] field.  I wrote the code but it is coming blank. Please suggest.Untitled.pngUntitled2.png

1 Solution

Accepted Solutions
niha
Creator II
Creator II
Author

Thanks a lot. It worked. I was able to produce Year, Month , Day from [Date Paid]. I need YearMonth too. If I want to add YearMonth what I have to do?
Thanks,
Niha


View solution in original post

3 Replies
rogerpegler
Creator II
Creator II

Try this instead of [Date Paid] = [Date Paid] in your load script

Date#([Date Paid],'YYYY/MM/DD') as [Date Paid]

jonathandienst
Partner - Champion III
Partner - Champion III

DatePaid is probably being loaded as a string. You need to convert to a  date before functions like Year(), Month() will work. Use the Date# function as described above, or like this:

Date(Date#([Date Paid],'YYYY/MM/DD')) as [Date Paid]
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
niha
Creator II
Creator II
Author

Thanks a lot. It worked. I was able to produce Year, Month , Day from [Date Paid]. I need YearMonth too. If I want to add YearMonth what I have to do?
Thanks,
Niha