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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to format the date field

Hi All,

I have attached one QVD, that includes two fields:Region,BudgetDate

But that BudgetDate, it seems like a string format, I can't use any Year,Month or others Date function on it, so how to handle this issue?

Thanks.

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

In the qvd file, the BudgetDate field has YYYY/MM/DD format. In order to load this date as a number, you may use the following script:

Budget:

LOAD Region, Num(Date#(BudgetDate,'YYYY/MM/DD')) as BudgetDate;

LOAD Region,

     BudgetDate

FROM

C:\Users\Kris\Downloads\Budget.qvd (qvd);

I did load your file using the above script and it works. You may use 'Date' function instead on 'Num' function depending on your application.

Hope this helps.

View solution in original post

1 Reply
nagaiank
Specialist III
Specialist III

In the qvd file, the BudgetDate field has YYYY/MM/DD format. In order to load this date as a number, you may use the following script:

Budget:

LOAD Region, Num(Date#(BudgetDate,'YYYY/MM/DD')) as BudgetDate;

LOAD Region,

     BudgetDate

FROM

C:\Users\Kris\Downloads\Budget.qvd (qvd);

I did load your file using the above script and it works. You may use 'Date' function instead on 'Num' function depending on your application.

Hope this helps.