Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with date format or function

Hi  Everyone,

I`m a beginer in QV and I work on Personal edition. I have a problem with Date. Enclosed you will find my source file. Simply I would like to do functions below:

FileBaseName() as Source,
Date(Date#([],'YYYY-MM-DD HH:MM:SS'),'DD-MM-YYYY') as Date,
  
Year(Date(Date#([],'YYYY-MM-DD HH:MM:SS'),'DD-MM-YYYY')) as Year,
      
Month(Date(Date#([],'YYYY-MM-DD HH:MM:SS'),'DD-MM-YYYY')) as Month,
       
Day(Date(Date#([],'YYYY-MM-DD HH:MM:SS'),'DD-MM-YYYY')) as Day,
          
'Q' & CEIL(num(Month(Date(Date#([Data wysłania],'YYYY-MM-DD HH:MM:SS'),'DD-MM-YYYY')))/3) as Quarter


but they don't work properly on my source file. Do you have some ideas how to solve this problem?

10 Replies
Eric_Tay
Employee
Employee

This works!  Anyone can explain why this works?

Left() returns string, but when we wrap it with Date() that takes numeric format of data, it works.