Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to get the Date from the Table Name

Hi,

i really need help, i am trying to load data which is the Table name contains the date, since im already done with the loading, my problem is. i need to get the date from the table name itself.

Table Name is like this:

HDMF_20120210

HDMF_20120431

HDMF_20110521

I want to generate the date from Table name and connect it to my Master Calendar.

Please HELP ME...

1 Solution

Accepted Solutions
shekharnil
New Contributor III

Re: How to get the Date from the Table Name

Use this which will give you another column with the date field

 

LOAD

[Pag-ibig No.],
[Last Name],
[First Name],
Initial,
[Employee Contribution],
[Employer Contribution],
Birthday,
MakeDate(mid(FileName(),6,4), mid(FileName(),10,2), mid(FileName(),12,2)) as DATE

FROM


(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq

);

8 Replies
Not applicable

Re: How to get the Date from the Table Name

Hi,

You can use the Function Filename() while loading your table.

SAMPLE:

LOAD

Data,

FileName() as RAW_Tablename,

MakeDate(mid(FileName(),6,4), mid(FileName(),10,2), mid(FileName(),12,2)) as DATE

FROM

C:\Users\alexis.tan\Desktop\HDMF_20120210.xlsx

(ooxml, embedded labels, table is Sheet1);

Something like this.

Regards,

Alex

shekharnil
New Contributor III

Re: How to get the Date from the Table Name

Use this which will give you another column with the date field

 

LOAD

[Pag-ibig No.],
[Last Name],
[First Name],
Initial,
[Employee Contribution],
[Employer Contribution],
Birthday,
MakeDate(mid(FileName(),6,4), mid(FileName(),10,2), mid(FileName(),12,2)) as DATE

FROM


(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq

);

Not applicable

Re: How to get the Date from the Table Name

Hi Alex,

thank you so much! I got the answer already. thanks for your help.

Not applicable

Re: How to get the Date from the Table Name

wow I gave the correct answer first but only helpful? nice

anyway, no problem, glad to have helped

Not applicable

Re: How to get the Date from the Table Name

Anyway Alex,

just curious, why does the answer you gave me has 3 parameters? thanks

Not applicable

Re: How to get the Date from the Table Name

did i? i maybe just an accident..

Not applicable

Re: How to get the Date from the Table Name

i marked your answer as a correct answer. hehe, well anyway, let me umark the helpful answer.haha!

Not applicable

Re: How to get the Date from the Table Name

I looked after seeing this in my inbox to tell you that you dont have to since I don't really care if you tag me as correct answer or not (I even said im glad to have helped). But unmarking me EVEN just as helpful o.o" THANK YOU? no points for me after I gave the answer I guess.

sanuela_jro wrote:

i marked your answer as a correct answer. hehe, well anyway, let me umark the helpful answer.haha!

GoodLuck

Community Browser